Author: tfaber
Date: Thu Jan 17 11:02:30 2013
New Revision: 58186
URL:
http://svn.reactos.org/svn/reactos?rev=58186&view=rev
Log:
[EXPLORER_NEW]
- Hide minimized window captions (and enable shell notifications, thus fixing taskbar
buttons). This should have been in r57978, but got lost.
- From Andrew Green's GSoC branch. Spotted by Edijus.
CORE-6899 #resolve
Modified:
trunk/reactos/base/shell/explorer-new/explorer.c
Modified: trunk/reactos/base/shell/explorer-new/explorer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/ex…
==============================================================================
--- trunk/reactos/base/shell/explorer-new/explorer.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer-new/explorer.c [iso-8859-1] Thu Jan 17 11:02:30
2013
@@ -348,6 +348,25 @@
return bRet;
}
+static VOID
+HideMinimizedWindows(IN BOOL bHide)
+{
+ MINIMIZEDMETRICS mm;
+
+ mm.cbSize = sizeof(mm);
+ if (!SystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(mm), &mm, 0))
+ {
+ DbgPrint("SystemParametersInfo failed with %lu\n", GetLastError());
+ return;
+ }
+ if (bHide)
+ mm.iArrange |= ARW_HIDE;
+ else
+ mm.iArrange &= ~ARW_HIDE;
+ if (!SystemParametersInfo(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0))
+ DbgPrint("SystemParametersInfo failed with %lu\n", GetLastError());
+}
+
INT WINAPI
_tWinMain(IN HINSTANCE hInstance,
IN HINSTANCE hPrevInstance,
@@ -392,6 +411,11 @@
if (RegisterTrayWindowClass() && RegisterTaskSwitchWndClass())
{
Tray = CreateTrayWindow();
+ /* This not only hides the minimized window captions in the bottom
+ left screen corner, but is also needed in order to receive
+ HSHELL_* notification messages (which are required for taskbar
+ buttons to work right) */
+ HideMinimizedWindows(TRUE);
if (Tray != NULL)
hShellDesktop = DesktopCreateWindow(Tray);
@@ -415,6 +439,7 @@
{
RegisterHotKey(NULL, IDHK_RUN, MOD_WIN, 'R');
TrayMessageLoop(Tray);
+ HideMinimizedWindows(FALSE);
ITrayWindow_Release(Tray);
UnregisterTrayWindowClass();
}