aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowwm.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-10 08:27:21 +0200
committermarha <marha@users.sourceforge.net>2011-10-10 08:27:21 +0200
commit7fae5492e3ef8e5fa15f742be4c2a15b9782e89a (patch)
tree6aecea8f8d4ba57acc626cc5eb58863b8f3105a4 /xorg-server/hw/xwin/winmultiwindowwm.c
parentab941773990635d79adb5b1ae16a008d7b2ed1ff (diff)
downloadvcxsrv-7fae5492e3ef8e5fa15f742be4c2a15b9782e89a.tar.gz
vcxsrv-7fae5492e3ef8e5fa15f742be4c2a15b9782e89a.tar.bz2
vcxsrv-7fae5492e3ef8e5fa15f742be4c2a15b9782e89a.zip
Handle more motif window decorating handling
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwm.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index 4e4d52be8..bbc1f47b5 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -1529,6 +1529,8 @@ winDeinitMultiWindowWM (void)
#define HINT_SIZEBOX (1l<<2)
#define HINT_CAPTION (1l<<3)
#define HINT_NOMAXIMIZE (1L<<4)
+#define HINT_NOMINIMIZE (1L<<5)
+#define HINT_NOSYSMENU (1L<<6)
/* These two are used on their own */
#define HINT_MAX (1L<<0)
#define HINT_MIN (1L<<1)
@@ -1589,6 +1591,16 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
if (mwm_hint->decorations & MwmDecorBorder) hint |= HINT_BORDER;
if (mwm_hint->decorations & MwmDecorHandle) hint |= HINT_SIZEBOX;
if (mwm_hint->decorations & MwmDecorTitle) hint |= HINT_CAPTION;
+ if (!(mwm_hint->decorations & MwmDecorMenu)) hint |= HINT_NOSYSMENU;
+ if (!(mwm_hint->decorations & MwmDecorMinimize)) hint |= HINT_NOMINIMIZE;
+ if (!(mwm_hint->decorations & MwmDecorMaximize)) hint |= HINT_NOMAXIMIZE;
+ }
+ else
+ {
+ /*
+ MwmDecorAll means all decorations *except* those specified by other flag
+ bits that are set. Not yet implemented.
+ */
}
}
if (mwm_hint) XFree(mwm_hint);
@@ -1685,6 +1697,12 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
if (hint & HINT_NOMAXIMIZE)
style = style & ~WS_MAXIMIZEBOX;
+ if (hint & HINT_NOMINIMIZE)
+ style = style & ~WS_MINIMIZEBOX;
+
+ if (hint & HINT_NOSYSMENU)
+ style = style & ~WS_SYSMENU;
+
if (!IsWindow (hWnd))
{
ErrorF("Windows window 0x%x has become invalid, so returning without applying hints\n",hWnd);
@@ -1696,7 +1714,7 @@ winApplyHints (Display *pDisplay, Window iWindow, HWND hWnd, HWND *zstyle)
if (!(SizeHints.max_width&&SizeHints.max_height&&(SizeHints.min_width == SizeHints.max_width)&&(SizeHints.min_height == SizeHints.max_height) ))
style|=WS_SIZEBOX;
}
- else
+ else
style|=WS_SIZEBOX;
SetWindowLongPtr (hWnd, GWL_STYLE, style);
}