xwin: Improve handling of no-decoration motif hint

When motif decoration hint asks for no decoration, don't add sysmenu,
mimimize or maximimize controls.

(This fixes a problem with e.g. fbpanel having a minimize control, but
gtk's panel_configure_event() doesn't like the state we put the window
into when we minimize it, causing it to spin)

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon Turney 2014-03-13 18:04:17 +00:00 committed by Adam Jackson
parent f75404be3a
commit d7cef6fbe2

View File

@ -1738,7 +1738,7 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle)
if (mwm_hint && nitems == PropMwmHintsElements &&
(mwm_hint->flags & MwmHintsDecorations)) {
if (!mwm_hint->decorations)
hint |= HINT_NOFRAME;
hint |= (HINT_NOFRAME | HINT_NOSYSMENU | HINT_NOMINIMIZE | HINT_NOMAXIMIZE);
else if (!(mwm_hint->decorations & MwmDecorAll)) {
if (mwm_hint->decorations & MwmDecorBorder)
hint |= HINT_BORDER;