From 9645941d981a8ed01a55cbee1f1e6fad84ac3fe0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Fri, 20 May 2011 10:28:42 +0100 Subject: [PATCH] Tell the window manager to respect the requested window size --- glws_glx.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/glws_glx.cpp b/glws_glx.cpp index bba108a..564af90 100644 --- a/glws_glx.cpp +++ b/glws_glx.cpp @@ -161,6 +161,15 @@ public: XResizeWindow(display, window, w, h); + // Tell the window manager to respect the requested size + XSizeHints *size_hints; + size_hints = XAllocSizeHints(); + size_hints->max_width = size_hints->min_width = w; + size_hints->max_height = size_hints->min_height = h; + size_hints->flags = PMinSize | PMaxSize; + XSetWMNormalHints(display, window, size_hints); + XFree(size_hints); + waitForEvent(window, ConfigureNotify); glXWaitX(); -- 2.45.2