mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
include explorer windows in desktop switching
svn path=/trunk/; revision=8413
This commit is contained in:
parent
907d42478e
commit
9bcc74655c
4 changed files with 10 additions and 13 deletions
|
@ -162,14 +162,9 @@ static BOOL CALLBACK DesktopEnumFct(HWND hwnd, LPARAM lparam)
|
|||
{
|
||||
WindowSet& windows = *(WindowSet*)lparam;
|
||||
|
||||
if (IsWindowVisible(hwnd)) {
|
||||
DWORD pid;
|
||||
|
||||
GetWindowThreadProcessId(hwnd, &pid);
|
||||
|
||||
if (pid != GetCurrentProcessId())
|
||||
if (IsWindowVisible(hwnd))
|
||||
if (hwnd!=g_Globals._hwndDesktopBar && hwnd!=g_Globals._hwndDesktop)
|
||||
windows.insert(hwnd);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ ExplorerGlobals::ExplorerGlobals()
|
|||
#endif
|
||||
_hwndDesktopBar = 0;
|
||||
_hwndShellView = 0;
|
||||
_hwndDesktop = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -687,14 +688,12 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL
|
|||
// initialize COM and OLE before creating the desktop window
|
||||
OleInit usingCOM;
|
||||
|
||||
HWND hwndDesktop = 0;
|
||||
|
||||
if (startup_desktop) {
|
||||
g_Globals._desktops.init();
|
||||
|
||||
hwndDesktop = DesktopWindow::Create();
|
||||
g_Globals._hwndDesktop = DesktopWindow::Create();
|
||||
#ifdef _USE_HDESK
|
||||
g_Globals._desktops.get_current_Desktop()->_hwndDesktop = hwndDesktop;
|
||||
g_Globals._desktops.get_current_Desktop()->_hwndDesktop = g_Globals._hwndDesktop;
|
||||
#endif
|
||||
|
||||
if (autostart) {
|
||||
|
@ -709,7 +708,7 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL
|
|||
lpCmdLine[_tcslen(lpCmdLine)-1] = '\0';
|
||||
}
|
||||
|
||||
if (hwndDesktop)
|
||||
if (g_Globals._hwndDesktop)
|
||||
g_Globals._desktop_mode = true;
|
||||
|
||||
int ret = explorer_main(hInstance, lpCmdLine, nShowCmd);
|
||||
|
|
|
@ -196,7 +196,9 @@ struct Desktops : public vector<DesktopRef>
|
|||
void init();
|
||||
void SwitchToDesktop(int idx);
|
||||
|
||||
#ifdef _USE_HDESK
|
||||
DesktopRef& get_current_Desktop() {return (*this)[_current_desktop];}
|
||||
#endif
|
||||
|
||||
int _current_desktop;
|
||||
};
|
||||
|
@ -227,6 +229,7 @@ extern struct ExplorerGlobals
|
|||
|
||||
HWND _hwndDesktopBar;
|
||||
HWND _hwndShellView;
|
||||
HWND _hwndDesktop;
|
||||
|
||||
Desktops _desktops;
|
||||
} g_Globals;
|
||||
|
|
|
@ -1057,7 +1057,7 @@ LRESULT FlatButton::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
|||
|
||||
if (IsWindowEnabled(_hwnd)) {
|
||||
DWORD pid_foreground;
|
||||
HWND hwnd_foreground = GetForegroundWindow(); //@@ vielleicht besser über WM_ACTIVATEAPP-Abfrage
|
||||
HWND hwnd_foreground = GetForegroundWindow(); //@@ may be better look for WM_ACTIVATEAPP ?
|
||||
GetWindowThreadProcessId(hwnd_foreground, &pid_foreground);
|
||||
|
||||
if (GetCurrentProcessId() == pid_foreground) {
|
||||
|
|
Loading…
Reference in a new issue