summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2014-04-16 18:08:45 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2015-11-03 17:14:45 +0000
commit049f9b94432bc11c6da78f9a400c39a5f164c034 (patch)
treebc7efcb4ef9658161a708bc648b2b26d6b9b8b57
parente174585dd15b8f3b40af46bf7fc3720c5b7bc629 (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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index a2aea304a..5cafc6393 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -1858,6 +1858,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;