summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
authorhurikhan <m4r10.5ch14ck@gmail.com>2015-01-22 01:14:50 +0900
committerhurikhan <m4r10.5ch14ck@gmail.com>2015-01-22 01:14:50 +0900
commit94d94a08558c83fb6e447c3e1ed858cf39c0e1ba (patch)
tree23e60f417f725b2cbec6bd0502ab231319eadbcd /platform/x11/os_x11.cpp
parent6dd1a21fb7fbac03fb8343f5858c22185ca6c59e (diff)
* fix compilation without scons experimental_wm_api=yes
* Extended the demo with an addional MouseGrab Test
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index d711cea42e..fa3701aeef 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -177,11 +177,7 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
context_gl = memnew( ContextGL_X11( x11_display, x11_window,current_videomode, false ) );
context_gl->initialize();
- if (true) {
- rasterizer = memnew( RasterizerGLES2 );
- } else {
- //rasterizer = memnew( RasterizerGLES1 );
- };
+ rasterizer = memnew( RasterizerGLES2 );
#endif
visual_server = memnew( VisualServerRaster(rasterizer) );
@@ -1164,10 +1160,12 @@ void OS_X11::process_xevents() {
case FocusIn:
minimized = false;
+#ifdef EXPERIMENTAL_WM_API
if(current_videomode.fullscreen) {
set_wm_fullscreen(true);
visual_server->init();
}
+#endif
main_loop->notification(MainLoop::NOTIFICATION_WM_FOCUS_IN);
if (mouse_mode==MOUSE_MODE_CAPTURED) {
XGrabPointer(x11_display, x11_window, True,
@@ -1178,11 +1176,13 @@ void OS_X11::process_xevents() {
break;
case FocusOut:
+#ifdef EXPERIMENTAL_WM_API
if(current_videomode.fullscreen) {
set_wm_fullscreen(false);
set_minimized(true);
visual_server->init();
}
+#endif
main_loop->notification(MainLoop::NOTIFICATION_WM_FOCUS_OUT);
if (mouse_mode==MOUSE_MODE_CAPTURED) {
//dear X11, I try, I really try, but you never work, you do whathever you want.