diff options
author | reduz <reduzio@gmail.com> | 2014-04-22 14:23:29 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2014-04-22 14:23:29 -0300 |
commit | 71cfed8a76fabd0653365d79ae87ad6e68c7bbbc (patch) | |
tree | 6c9d71ee79613d6d5ee089c3293fa2e8f19324be | |
parent | 6f1410a8370cfb0b6fcbe072214ce1268cefdf04 (diff) | |
parent | b28c1e749ab4a4a936b326d2e9898a215cb3f2dd (diff) |
Merge pull request #315 from adolson/patch-2
add display/resizable support to Linux
-rw-r--r-- | platform/x11/context_gl_x11.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/x11/context_gl_x11.cpp b/platform/x11/context_gl_x11.cpp index 12708f52e2..be4061fb93 100644 --- a/platform/x11/context_gl_x11.cpp +++ b/platform/x11/context_gl_x11.cpp @@ -129,6 +129,18 @@ Error ContextGL_X11::initialize() { } //}; + if (!OS::get_singleton()->get_video_mode().resizable) { + XSizeHints *xsh; + xsh = XAllocSizeHints(); + xsh->flags = PMinSize | PMaxSize; + xsh->min_width = OS::get_singleton()->get_video_mode().width; + xsh->max_width = OS::get_singleton()->get_video_mode().width; + xsh->min_height = OS::get_singleton()->get_video_mode().height; + xsh->max_height = OS::get_singleton()->get_video_mode().height; + XSetWMNormalHints(x11_display, x11_window, xsh); + } + + if (!opengl_3_context) { //oldstyle context: p->glx_context = glXCreateContext(x11_display, vi, 0, GL_TRUE); |