From a9e73131b6453e0fa2da5360e84af7a2eae3b205 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Thu, 8 May 2014 11:40:39 +0100 Subject: xwin: Correctly interpret WM_HINTS, WM_NORMAL_HINTS properties on x86_64 Signed-off-by: Jon Turney Reviewed-by: Colin Harrison --- hw/xwin/winmultiwindowclass.h | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/hw/xwin/winmultiwindowclass.h b/hw/xwin/winmultiwindowclass.h index 3244f78e3..37ee9fb13 100644 --- a/hw/xwin/winmultiwindowclass.h +++ b/hw/xwin/winmultiwindowclass.h @@ -30,12 +30,25 @@ * Authors: Earle F. Philhower, III */ +/* + * The next block of definitions are for window manager properties that + * clients and applications use for communication. + */ + /* * Structures */ +/* + * WM_HINTS structure + * + * NOTE: this structure represents the internal format stored in the property + * after it is marshalled by libX11, converting the flags field from an + * arch-dependent long to a 32-bit int. + */ + typedef struct { - long flags; /* marks which fields in this structure are defined */ + int flags; /* marks which fields in this structure are defined */ Bool input; /* does this application rely on the window manager to get keyboard input? */ int initial_state; /* see below */ @@ -59,11 +72,15 @@ typedef struct { #define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint|IconPositionHint|IconMaskHint|WindowGroupHint) /* - * new version containing base_width, base_height, and win_gravity fields; + * ICCCM 1.0 version containing base_width, base_height, and win_gravity fields; * used with WM_NORMAL_HINTS. + * + * NOTE: this structure represents the internal format stored in the property + * after it is marshalled by libX11, converting the flags field from an + * arch-dependent long to a 32-bit int. */ typedef struct { - long flags; /* marks which fields in this structure are defined */ + int flags; /* marks which fields in this structure are defined */ int x, y; /* obsolete for new window mgrs, but clients */ int width, height; /* should set so old wm's don't mess up */ int min_width, min_height; @@ -77,11 +94,6 @@ typedef struct { int win_gravity; /* added by ICCCM version 1 */ } WinXSizeHints; -/* - * The next block of definitions are for window manager properties that - * clients and applications use for communication. - */ - /* flags argument in size hints */ #define USPosition (1L << 0) /* user specified x, y */ #define USSize (1L << 1) /* user specified width, height */ -- cgit v1.2.3