mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:02:58 +00:00
[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 svn path=/trunk/; revision=58186
This commit is contained in:
parent
a5192cf84c
commit
b8577036db
1 changed files with 25 additions and 0 deletions
|
@ -348,6 +348,25 @@ GetVersionInfoString(IN TCHAR *szFileName,
|
||||||
return bRet;
|
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
|
INT WINAPI
|
||||||
_tWinMain(IN HINSTANCE hInstance,
|
_tWinMain(IN HINSTANCE hInstance,
|
||||||
IN HINSTANCE hPrevInstance,
|
IN HINSTANCE hPrevInstance,
|
||||||
|
@ -392,6 +411,11 @@ _tWinMain(IN HINSTANCE hInstance,
|
||||||
if (RegisterTrayWindowClass() && RegisterTaskSwitchWndClass())
|
if (RegisterTrayWindowClass() && RegisterTaskSwitchWndClass())
|
||||||
{
|
{
|
||||||
Tray = CreateTrayWindow();
|
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)
|
if (Tray != NULL)
|
||||||
hShellDesktop = DesktopCreateWindow(Tray);
|
hShellDesktop = DesktopCreateWindow(Tray);
|
||||||
|
@ -415,6 +439,7 @@ _tWinMain(IN HINSTANCE hInstance,
|
||||||
{
|
{
|
||||||
RegisterHotKey(NULL, IDHK_RUN, MOD_WIN, 'R');
|
RegisterHotKey(NULL, IDHK_RUN, MOD_WIN, 'R');
|
||||||
TrayMessageLoop(Tray);
|
TrayMessageLoop(Tray);
|
||||||
|
HideMinimizedWindows(FALSE);
|
||||||
ITrayWindow_Release(Tray);
|
ITrayWindow_Release(Tray);
|
||||||
UnregisterTrayWindowClass();
|
UnregisterTrayWindowClass();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue