From a5248aa7bc37f4c9bff3deeb8e327f8fe4b896d8 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sat, 28 Feb 2004 15:14:38 +0000 Subject: [PATCH] desktop switching: allow applications to be visible only on one desktop svn path=/trunk/; revision=8446 --- .../system/explorer/desktop/desktop.cpp | 15 ++++++++++- reactos/subsys/system/explorer/doc/TODO.txt | 26 +++---------------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/reactos/subsys/system/explorer/desktop/desktop.cpp b/reactos/subsys/system/explorer/desktop/desktop.cpp index e836331a63d..b2901092d73 100644 --- a/reactos/subsys/system/explorer/desktop/desktop.cpp +++ b/reactos/subsys/system/explorer/desktop/desktop.cpp @@ -182,10 +182,18 @@ void Desktops::SwitchToDesktop(int idx) WindowSet& windows = old_desktop._windows; windows.clear(); + + // collect window handles of all other desktops + WindowSet other_wnds; + for(const_iterator it1=begin(); it1!=end(); ++it1) + for(WindowSet::const_iterator it2=it1->_windows.begin(); it2!=it1->_windows.end(); ++it2) + other_wnds.insert(*it2); + EnumWindows(SwitchDesktopEnumFct, (LPARAM)&windows); + old_desktop._hwndForeground = (HWND)SendMessage(g_Globals._hwndDesktopBar, PM_GET_LAST_ACTIVE, 0, 0); - // hide all windows we found + // hide all windows of the previous desktop for(WindowSet::iterator it=windows.begin(); it!=windows.end(); ++it) ShowWindowAsync(*it, SW_HIDE); @@ -196,6 +204,11 @@ void Desktops::SwitchToDesktop(int idx) if (desktop._hwndForeground) SetForegroundWindow(desktop._hwndForeground); + // remove the window handles of the other desktops from what we found on the previous desktop + for(WindowSet::const_iterator it=other_wnds.begin(); it!=other_wnds.end(); ++it) + windows.erase(*it); + + // We don't need to store the window handles of what's now visible the now current desktop. desktop._windows.clear(); _current_desktop = idx; diff --git a/reactos/subsys/system/explorer/doc/TODO.txt b/reactos/subsys/system/explorer/doc/TODO.txt index 1b1e26401b9..728840c64f6 100644 --- a/reactos/subsys/system/explorer/doc/TODO.txt +++ b/reactos/subsys/system/explorer/doc/TODO.txt @@ -21,8 +21,11 @@ - implement blink effect in task bar for SetForegoundWindow() requests - implement more than one column or scrolling in start menus for very crowded start menus - Execute selected programs with additional command line options ("Run" dialog with pre-filled edit field) - +- switch background images with desktop switcher +- Desktop Manager: Desktop Names; Speicherung der Verteilung von Applikations-Fenstern auf die verschiedenen Desktops -> config file - autostart doesn't work on NT4 ? +- hide desktop bar when showing full screen applications +- new start menu entry "Filemanager" close to "Explore" -> display C: and D: drive in MDI window - Startmenu: You can't close the start menu with pressing Win-key You can open the start menu with pressing Win-key, but can't close with another hit of Win-key. @@ -32,24 +35,3 @@ Yes, ROS explorer doesn't read many settings from the registry currently, as it doesn't have a way to configure them. (missing configuration dialogs) -- Vollbildfenster suchen -> Taskleiste ausblenden -- Desktop-Manager: Speicherung der Verteilung von Applikations-Fenstern auf die verschiedenen Desktops; Desktop-Namen -- neuer Startmenü-Eintrag: "Filemanager" neben "Explore" -> Anzeige von C: und D: - -> When minimizing window such as Sleipnir; a popular -> IE-based tab browser in Japan: -> http://www20.pos.to/~sleipnir/software/sleipnir/index.html -> the window'll not stored into the notification area but just minimized; instead of the setting. -> This might be a problem of application which doesn't handle the event, but it works under MS-explorer. -> I tested on 1.42JA, but I also tested and it reproduced on 1.41EN. -> The setting are: Tools->Sleipnir Options->System Tray->turn both settings on -> When you click the minimize button on the top-right of the window, it -> minimizes successfully into SysTray, but on the other hand, when you minimize the -> window by clicking the taskbutton, it minimizes but doesn't go into SysTray. - -> mIRC doesn't expect to be on two desktops at the same time. -> There may be a internal variables, which say: "I am minimized or not." and -> "I am visible or not." So I will have to adjust desktop switching in a -> way, that applications are either visible or not - but not mixed between two -> different desktops. -