{
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;
}
#endif
_hwndDesktopBar = 0;
_hwndShellView = 0;
+ _hwndDesktop = 0;
}
// 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();
if (autostart) {
char* argv[] = {"", "s"}; // call startup routine in SESSION_START mode
lpCmdLine[_tcslen(lpCmdLine)-1] = '\0';
}
- if (hwndDesktop)
+ if (g_Globals._hwndDesktop)
g_Globals._desktop_mode = true;
int ret = explorer_main(hInstance, lpCmdLine, nShowCmd);
void init();
void SwitchToDesktop(int idx);
- DesktopRef& get_current_Desktop() {return (*this)[_current_desktop];}
-
int _current_desktop;
};
HWND _hwndDesktopBar;
HWND _hwndShellView;
+ HWND _hwndDesktop;
Desktops _desktops;
} g_Globals;
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) {