diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2015-11-10 14:18:29 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2016-11-17 13:15:44 +0000 |
commit | 5c11e74571295d653f17d3ad92f98a54bdaa07ed (patch) | |
tree | 1ebbe7832f703ccfc4dfd8d73f81b449870475fc | |
parent | 765978474c9fd9ddb030f201930f02507832cc7d (diff) |
Make all windows resizable unless WM_NORMAL_HINTS indicates otherwise
Make all windows resizeable unless WM_NORMAL_HINTS indicates otherwise. This
ensures that Gnome applications using client-side decorations (e.g. gedit) with
a certain vintage of gtk+ (3.14) get a resizeable frame.
(Earlier versions do not use csd, and later versions request no frame and draw
the frame themselves)
This means that the absence of MWM_DECOR_RESIZEH in _MOTIF_WM_HINT has no
effect, but hopefully that is redundant to WM_NORMAL_HINTS indicating
non-resizeability.
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index 843d4ac9e..d53d114ca 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -2060,8 +2060,14 @@ winApplyHints(WMInfoPtr pWMInfo, xcb_window_t iWindow, HWND hWnd, HWND * zstyle, cookie = xcb_icccm_get_wm_normal_hints(conn, iWindow); if (xcb_icccm_get_wm_normal_hints_reply(conn, cookie, &size_hints, NULL)) { - if (size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE) { + /* Notwithstanding MwmDecorHandle, if we have a border, and + WM_NORMAL_HINTS indicates the window should be resizeable, let + the window have a resizing border. This is necessary for windows + with gtk3+ 3.14 csd. */ + if (hint & HINT_BORDER) + hint |= HINT_SIZEBOX; + if (size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE) { /* Not maximizable if a maximum size is specified, and that size is smaller (in either dimension) than the screen size */ if ((size_hints.max_width < GetSystemMetrics(SM_CXVIRTUALSCREEN)) |