add display/resizable support to Linux

add display/resizable support to Linux
This commit is contained in:
adolson 2014-04-22 03:17:20 -04:00
parent 6f1410a837
commit b28c1e749a
1 changed files with 12 additions and 0 deletions

View File

@ -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);