diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-04-16 18:08:45 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-04-16 18:41:08 +0100 |
commit | 4c219c4e18d0d439de29460ccc542050e495b3b3 (patch) | |
tree | 5581e23ea4ca7f2e3048cd3a68173ef4cfcf97b0 | |
parent | 58573e141706404e3799f2cb258c6cd0a9bfebfd (diff) |
Fix appearance of windows with only WM_NORMAL_HINTS
Now that XGetWMNormalHints() is actually being used, we can have a window with
default style, but HINT_NOMAXIMIZE, but this doesn't get given the default
style. (Testcase: Xephyr)
This is just a quick workaround. To fix this properly, we should probably
rewrite winApplyHints() so it starts from a default and then modifies it
depending on the hints, rather than trying to set the default style at the end
if we guess no other style has been set.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index 7833932fe..c9f0b304b 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -1860,6 +1860,10 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle) if (normal_hint && XGetWMNormalHints(pDisplay, iWindow, normal_hint, &supplied)) { if (normal_hint->flags & PMaxSize) { + /* Ensure default style is used if no other styling */ + if (!(hint & ~HINT_SKIPTASKBAR)) + hint |= HINT_BORDER | HINT_SIZEBOX | HINT_CAPTION; + /* Not maximizable if a maximum size is specified */ hint |= HINT_NOMAXIMIZE; |