diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-07-02 14:56:16 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-07-03 15:39:00 +0100 |
commit | 40578efeec58d6b4df9089f4252fb56abb92c449 (patch) | |
tree | 95f9586238e776fef28c0f881f09326d2eab68b7 | |
parent | 41f18e700c8d28ecaff4c70d3e1f21e7e48d21de (diff) |
Another attempt at avoiding creating windows which are not at the top
-rw-r--r-- | src/wndproc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wndproc.c b/src/wndproc.c index cd3805f..f49c2e1 100644 --- a/src/wndproc.c +++ b/src/wndproc.c @@ -1571,8 +1571,9 @@ winCreateWindowsWindow(xcwm_window_t *window) SetWindowLongPtr(hWnd, GWL_STYLE, (WS_POPUP | WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS) & ~WS_CAPTION & ~WS_SIZEBOX); } - /* place the window in front of all other non-topmost windows */ - SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + /* Raise to topmost, then down to notopmost, to put the window at the top of the Z-order without activating it */ + SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); } else { |