https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5a1984c99853fa8e551f86...
commit 5a1984c99853fa8e551f864e28c1673f9de732b5 Author: Giannis Adamopoulos gadamopoulos@reactos.org AuthorDate: Sun Jan 28 19:20:12 2018 +0200 Commit: Giannis Adamopoulos gadamopoulos@reactos.org CommitDate: Sun Jan 28 20:24:02 2018 +0200
[EXPLORER] CTaskSwitchWnd: Implement getting the setting for grouping tasks. This doesn't work yet but the setting does get stored in m_IsGroupingEnabled. TSWM_ENABLEGROUPING is not needed. --- base/shell/explorer/precomp.h | 1 - base/shell/explorer/taskswnd.cpp | 22 ++++++---------------- 2 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/base/shell/explorer/precomp.h b/base/shell/explorer/precomp.h index 5c9676be30..228fc75c5f 100644 --- a/base/shell/explorer/precomp.h +++ b/base/shell/explorer/precomp.h @@ -349,7 +349,6 @@ HRESULT CSysPagerWnd_CreateInstance(HWND hwndParent, REFIID riid, void **ppv); * taskswnd.c */
-#define TSWM_ENABLEGROUPING (WM_USER + 1) #define TSWM_UPDATETASKBARPOS (WM_USER + 2)
HRESULT CTaskSwitchWnd_CreateInstance(IN HWND hWndParent, IN OUT ITrayWindow *Tray, REFIID riid, void **ppv); diff --git a/base/shell/explorer/taskswnd.cpp b/base/shell/explorer/taskswnd.cpp index 18fa2c1e69..590dc4062d 100644 --- a/base/shell/explorer/taskswnd.cpp +++ b/base/shell/explorer/taskswnd.cpp @@ -1718,19 +1718,6 @@ public: return Ret; }
- LRESULT OnEnableGrouping(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) - { - LRESULT Ret = m_IsGroupingEnabled; - if ((BOOL)wParam != m_IsGroupingEnabled) - { - m_IsGroupingEnabled = (BOOL)wParam; - - /* Collapse or expand groups if necessary */ - UpdateButtonsSize(FALSE); - } - return Ret; - } - LRESULT OnUpdateTaskbarPos(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { /* Update the button spacing */ @@ -1743,8 +1730,12 @@ public: TaskbarSettings* newSettings = (TaskbarSettings*)lParam; if (newSettings->bGroupButtons != g_TaskbarSettings.bGroupButtons) { - /* TODO: Toggle grouping */ g_TaskbarSettings.bGroupButtons = newSettings->bGroupButtons; + m_IsGroupingEnabled = g_TaskbarSettings.bGroupButtons; + + /* Collapse or expand groups if necessary */ + RefreshWindowList(); + UpdateButtonsSize(FALSE); }
return 0; @@ -1833,7 +1824,7 @@ public: HRESULT Initialize(IN HWND hWndParent, IN OUT ITrayWindow *tray) { m_Tray = tray; - m_IsGroupingEnabled = TRUE; /* FIXME */ + m_IsGroupingEnabled = g_TaskbarSettings.bGroupButtons; Create(hWndParent, 0, szRunningApps, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP); if (!m_hWnd) return E_FAIL; @@ -1864,7 +1855,6 @@ public: MESSAGE_HANDLER(WM_NCHITTEST, OnNcHitTest) MESSAGE_HANDLER(WM_COMMAND, OnCommand) MESSAGE_HANDLER(WM_NOTIFY, OnNotify) - MESSAGE_HANDLER(TSWM_ENABLEGROUPING, OnEnableGrouping) MESSAGE_HANDLER(TSWM_UPDATETASKBARPOS, OnUpdateTaskbarPos) MESSAGE_HANDLER(TWM_SETTINGSCHANGED, OnTaskbarSettingsChanged) MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu)