From 7b9ad2ae7fcd075359d15ca3905a923c2c78c659 Mon Sep 17 00:00:00 2001 From: Brian Mattern Date: Sun, 28 Jul 2013 08:48:48 -0700 Subject: use correct element types for MWMHints From the XChangeProperty man page: "If the specified format is 32, the property data must be a long array." --- src/winwidget.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/winwidget.h b/src/winwidget.h index be5a761..89d5bcd 100644 --- a/src/winwidget.h +++ b/src/winwidget.h @@ -61,11 +61,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* Motif window hints */ typedef struct _mwmhints { - CARD32 flags; - CARD32 functions; - CARD32 decorations; - INT32 input_mode; - CARD32 status; + unsigned long flags; + unsigned long functions; + unsigned long decorations; + long input_mode; + unsigned long status; } MWMHints; enum win_type { -- cgit v1.2.3 From adf901a3374bf316b217a46e04de76e1a52a4131 Mon Sep 17 00:00:00 2001 From: Brian Mattern Date: Sun, 28 Jul 2013 10:52:41 -0700 Subject: initialize mwmhints to 0 --- src/winwidget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/winwidget.c b/src/winwidget.c index 1f4fbc0..133aa89 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -228,6 +228,7 @@ void winwidget_create_window(winwidget ret, int w, int h) KeyPressMask | KeyReleaseMask | ButtonMotionMask | ExposureMask | FocusChangeMask | PropertyChangeMask | VisibilityChangeMask; + memset(&mwmhints, 0, sizeof(mwmhints)); if (opt.borderless || ret->full_screen) { prop = XInternAtom(disp, "_MOTIF_WM_HINTS", True); if (prop == None) { @@ -240,8 +241,7 @@ void winwidget_create_window(winwidget ret, int w, int h) mwmhints.flags = MWM_HINTS_DECORATIONS; mwmhints.decorations = 0; } - } else - mwmhints.flags = 0; + } ret->win = XCreateWindow(disp, DefaultRootWindow(disp), x, y, w, h, 0, -- cgit v1.2.3