From: José Fonseca Date: Fri, 20 May 2011 09:28:42 +0000 (+0100) Subject: Tell the window manager to respect the requested window size X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=9645941d981a8ed01a55cbee1f1e6fad84ac3fe0;p=apitrace Tell the window manager to respect the requested window size --- 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();