hw/xwin: Use ITaskBarList interface to ensure show-on-taskbar state is updated correctly

Use ITaskBarList interface to ensure that the taskbar notices if the window has
changed it's style in a way which affects if the taskbar shows it or not.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon TURNEY 2013-01-09 20:15:01 +00:00
parent c94d1cb0a4
commit 56e94403f8

View File

@ -614,6 +614,19 @@ UpdateStyle(WMInfoPtr pWMInfo, Window iWindow)
if (zstyle == HWND_NOTOPMOST)
flags |= SWP_NOZORDER | SWP_NOOWNERZORDER;
SetWindowPos(hWnd, NULL, 0, 0, 0, 0, flags);
/*
Use the WS_EX_TOOLWINDOW style to remove window from Alt-Tab window switcher
According to MSDN, this is supposed to remove the window from the taskbar as well,
if we SW_HIDE before changing the style followed by SW_SHOW afterwards.
But that doesn't seem to work reliably, and causes the window to flicker, so use
the iTaskbarList interface to tell the taskbar to show or hide this window.
*/
winShowWindowOnTaskbar(hWnd,
(GetWindowLongPtr(hWnd, GWL_EXSTYLE) &
WS_EX_APPWINDOW) ? TRUE : FALSE);
}
#if 0