set the min size hints for x11 to prevent tiny windows messing up blenders internal...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 20 Oct 2009 07:51:42 +0000 (07:51 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 20 Oct 2009 07:51:42 +0000 (07:51 +0000)
intern/ghost/intern/GHOST_WindowX11.cpp

index 95441e74771b9dd56050e07cb693d452d1ae6f28..d40ce4145f50762141a7c2006d12c50b43ce49bc 100644 (file)
@@ -297,11 +297,13 @@ GHOST_WindowX11(
        // we want this window treated.
 
        XSizeHints * xsizehints = XAllocSizeHints();
-       xsizehints->flags = USPosition | USSize;
+       xsizehints->flags = USPosition | USSize | PMinSize;
        xsizehints->x = left;
        xsizehints->y = top;
        xsizehints->width = width;
        xsizehints->height = height;
+       xsizehints->min_width= 320;     // size hints, could be made apart of the ghost api
+       xsizehints->min_height= 240;    // limits are also arbitrary, but should not allow 1x1 window
        XSetWMNormalHints(m_display, m_window, xsizehints);
        XFree(xsizehints);
 
@@ -382,7 +384,6 @@ GHOST_WindowX11(
        XSetWMHints(display, m_window, xwmhints );
        XFree(xwmhints);
        // done setting the icon
-       
 
        setTitle(title);