diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index e40a6a10f..83011359c 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -23,9 +23,6 @@ if(Linux)
     endif(GTK2_FOUND)
 
     find_package(X11)
-    # Manually find Xxf86vm because it is not done in the module...
-    FIND_LIBRARY(X11_Xxf86vm_LIB Xxf86vm       ${X11_LIB_SEARCH_PATH})
-    MARK_AS_ADVANCED(X11_Xxf86vm_LIB)
 endif(Linux)
 
 ## Use cmake package to find module
diff --git a/plugins/zzogl-pg/opengl/CMakeLists.txt b/plugins/zzogl-pg/opengl/CMakeLists.txt
index 3e08f0c62..872dd6c8d 100644
--- a/plugins/zzogl-pg/opengl/CMakeLists.txt
+++ b/plugins/zzogl-pg/opengl/CMakeLists.txt
@@ -155,9 +155,6 @@ target_link_libraries(${Output} ${OPENGL_LIBRARIES})
 # link target with X11
 target_link_libraries(${Output} ${X11_LIBRARIES})
 
-# link target with X11 videomod
-target_link_libraries(${Output} ${X11_Xxf86vm_LIB})
-
 # User flags options
 if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
     target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
diff --git a/plugins/zzogl-pg/opengl/GLWinX11.cpp b/plugins/zzogl-pg/opengl/GLWinX11.cpp
index 9650329ee..a762d4200 100644
--- a/plugins/zzogl-pg/opengl/GLWinX11.cpp
+++ b/plugins/zzogl-pg/opengl/GLWinX11.cpp
@@ -179,8 +179,10 @@ void GLWindow::ToggleFullscreen()
     XLockDisplay(glDisplay);
     if (!XSendEvent(glDisplay, RootWindow(glDisplay, vi->screen), False, mask, (XEvent*)(&cme)))
         ZZLog::Error_Log("Failed to send event: toggle fullscreen");
-    else
+    else {
         fullScreen = (!fullScreen);
+        conf.setFullscreen(fullScreen);
+    }
     XUnlockDisplay(glDisplay);
 
     // Apply the change
@@ -204,7 +206,6 @@ bool GLWindow::DisplayWindow(int _width, int _height)
 	
 	x = conf.x;
 	y = conf.y;
-	fullScreen = (conf.fullscreen());
 
 	if (!CreateVisual()) return false;
 	
@@ -247,7 +248,9 @@ bool GLWindow::DisplayWindow(int _width, int _height)
 	else
 		ZZLog::Error_Log("No Direct Rendering possible!");
 
-	if (fullScreen) {
+    // init fullscreen to 0. ToggleFullscreen will update it
+	fullScreen = 0;
+	if (conf.fullscreen()) {
         ToggleFullscreen();
     } else {
         // Restore the window position