forked from bartvdbraak/blender
set the min size hints for x11 to prevent tiny windows messing up blenders internal ui layout
This commit is contained in:
parent
8bc1087e2e
commit
cae71123e5
@ -297,11 +297,13 @@ GHOST_WindowX11(
|
|||||||
// we want this window treated.
|
// we want this window treated.
|
||||||
|
|
||||||
XSizeHints * xsizehints = XAllocSizeHints();
|
XSizeHints * xsizehints = XAllocSizeHints();
|
||||||
xsizehints->flags = USPosition | USSize;
|
xsizehints->flags = USPosition | USSize | PMinSize;
|
||||||
xsizehints->x = left;
|
xsizehints->x = left;
|
||||||
xsizehints->y = top;
|
xsizehints->y = top;
|
||||||
xsizehints->width = width;
|
xsizehints->width = width;
|
||||||
xsizehints->height = height;
|
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);
|
XSetWMNormalHints(m_display, m_window, xsizehints);
|
||||||
XFree(xsizehints);
|
XFree(xsizehints);
|
||||||
|
|
||||||
@ -383,7 +385,6 @@ GHOST_WindowX11(
|
|||||||
XFree(xwmhints);
|
XFree(xwmhints);
|
||||||
// done setting the icon
|
// done setting the icon
|
||||||
|
|
||||||
|
|
||||||
setTitle(title);
|
setTitle(title);
|
||||||
|
|
||||||
initXInputDevices();
|
initXInputDevices();
|
||||||
|
Loading…
Reference in New Issue
Block a user