Changed: #984 Create setWindowStyle and getWindowStyle private methods in OpenGL driver
This commit is contained in:
parent
c2826bf4f5
commit
a75ad193ef
1 changed files with 10 additions and 7 deletions
|
@ -1080,7 +1080,7 @@ bool CDriverGL::setWindowStyle(EWindowStyle windowStyle)
|
||||||
// If we're going to attempt fullscreen, we need to set redirect to True,
|
// If we're going to attempt fullscreen, we need to set redirect to True,
|
||||||
// This basically places the window with no borders in the top left
|
// This basically places the window with no borders in the top left
|
||||||
// corner of the screen.
|
// corner of the screen.
|
||||||
if (mode.Windowed)
|
if (windowStyle == EWSWindowed)
|
||||||
{
|
{
|
||||||
attr.override_redirect = False;
|
attr.override_redirect = False;
|
||||||
}
|
}
|
||||||
|
@ -1591,20 +1591,23 @@ void CDriverGL::setWindowSize(uint32 width, uint32 height)
|
||||||
|
|
||||||
#elif defined(NL_OS_UNIX) && !defined(NL_MAC_NATIVE)
|
#elif defined(NL_OS_UNIX) && !defined(NL_MAC_NATIVE)
|
||||||
|
|
||||||
|
// Update WM hints (update size and allow resizing)
|
||||||
|
XSizeHints size_hints;
|
||||||
|
size_hints.width = width;
|
||||||
|
size_hints.height = height;
|
||||||
|
size_hints.flags = PSize;
|
||||||
|
|
||||||
if (!_Resizable)
|
if (!_Resizable)
|
||||||
{
|
{
|
||||||
// Update WM hints (update size and allow resizing)
|
size_hints.flags |= PMinSize | PMaxSize;
|
||||||
XSizeHints size_hints;
|
|
||||||
|
|
||||||
size_hints.flags = PMinSize | PMaxSize;
|
|
||||||
size_hints.min_width = width;
|
size_hints.min_width = width;
|
||||||
size_hints.min_height = height;
|
size_hints.min_height = height;
|
||||||
size_hints.max_width = width;
|
size_hints.max_width = width;
|
||||||
size_hints.max_height = height;
|
size_hints.max_height = height;
|
||||||
|
|
||||||
XSetWMNormalHints(_dpy, _win, &size_hints);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XSetWMNormalHints(_dpy, _win, &size_hints);
|
||||||
|
|
||||||
// set position to (0, 0) if fullscreen
|
// set position to (0, 0) if fullscreen
|
||||||
if (_FullScreen)
|
if (_FullScreen)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue