]> git.cworth.org Git - apitrace/commitdiff
Tell the window manager to respect the requested window size
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Fri, 20 May 2011 09:28:42 +0000 (10:28 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Fri, 20 May 2011 09:28:42 +0000 (10:28 +0100)
glws_glx.cpp

index bba108a43a5d64c175368cc0cacfd1068c5d04f9..564af90ee3e0ef61006b2a4c829b7b5b098eaaf9 100644 (file)
@@ -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();