Commit d6dcde7a authored by Jon Turney's avatar Jon Turney
Browse files

hw/xwin: Stop assuming WS_EX_APPWINDOW style in WM_SHOWWINDOW


Signed-off-by: Jon Turney's avatarJon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: default avatarColin Harrison <colin.harrison@virgin.net>
parent 56e94403
......@@ -870,41 +870,36 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/* */
if (!pWin->overrideRedirect) {
HWND zstyle = HWND_NOTOPMOST;
/* Flag that this window needs to be made active when clicked */
SetProp(hwnd, WIN_NEEDMANAGE_PROP, (HANDLE) 1);
if (!(GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_APPWINDOW)) {
HWND zstyle = HWND_NOTOPMOST;
/* Set the window extended style flags */
SetWindowLongPtr(hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW);
/* Set the transient style flags */
if (GetParent(hwnd))
SetWindowLongPtr(hwnd, GWL_STYLE,
WS_POPUP | WS_OVERLAPPED | WS_SYSMENU |
WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
/* Set the window standard style flags */
else
SetWindowLongPtr(hwnd, GWL_STYLE,
(WS_POPUP | WS_OVERLAPPEDWINDOW |
WS_CLIPCHILDREN | WS_CLIPSIBLINGS)
& ~WS_CAPTION & ~WS_SIZEBOX);
winUpdateWindowPosition(hwnd, &zstyle);
{
WinXWMHints hints;
if (winMultiWindowGetWMHints(pWin, &hints)) {
/*
Give the window focus, unless it has an InputHint
which is FALSE (this is used by e.g. glean to
avoid every test window grabbing the focus)
*/
if (!((hints.flags & InputHint) && (!hints.input))) {
SetForegroundWindow(hwnd);
}
/* Set the transient style flags */
if (GetParent(hwnd))
SetWindowLongPtr(hwnd, GWL_STYLE,
WS_POPUP | WS_OVERLAPPED | WS_SYSMENU |
WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
/* Set the window standard style flags */
else
SetWindowLongPtr(hwnd, GWL_STYLE,
(WS_POPUP | WS_OVERLAPPEDWINDOW |
WS_CLIPCHILDREN | WS_CLIPSIBLINGS)
& ~WS_CAPTION & ~WS_SIZEBOX);
winUpdateWindowPosition(hwnd, &zstyle);
{
WinXWMHints hints;
if (winMultiWindowGetWMHints(pWin, &hints)) {
/*
Give the window focus, unless it has an InputHint
which is FALSE (this is used by e.g. glean to
avoid every test window grabbing the focus)
*/
if (!((hints.flags & InputHint) && (!hints.input))) {
SetForegroundWindow(hwnd);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment