Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp	(revision 56929)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp	(revision 56930)
@@ -36,44 +36,4 @@
 static BOOL gX11ScreenSaverDpmsAvailable;
 static BOOL gX11DpmsState;
-
-void X11ScreenSaverSettingsInit()
-{
-    int     dummy;
-    Display *display = QX11Info::display();
-    gX11ScreenSaverDpmsAvailable = DPMSQueryExtension(display, &dummy, &dummy);
-}
-
-void X11ScreenSaverSettingsSave()
-{
-    /* Actually this is a big mess. By default the libSDL disables the screen saver
-     * during the SDL_InitSubSystem() call and restores the saved settings during
-     * the SDL_QuitSubSystem() call. This mechanism can be disabled by setting the
-     * environment variable SDL_VIDEO_ALLOW_SCREENSAVER to 1. However, there is a
-     * known bug in the Debian libSDL: If this environment variable is set, the
-     * screen saver is still disabled but the old state is not restored during
-     * SDL_QuitSubSystem()! So the only solution to overcome this problem is to
-     * save and restore the state prior and after each of these function calls. */
-
-    int     dummy;
-    CARD16  dummy2;
-    Display *display = QX11Info::display();
-
-    XGetScreenSaver(display, &gX11ScreenSaverTimeout, &dummy, &dummy, &dummy);
-    if (gX11ScreenSaverDpmsAvailable)
-        DPMSInfo(display, &dummy2, &gX11DpmsState);
-}
-
-void X11ScreenSaverSettingsRestore()
-{
-    int     timeout, interval, preferBlank, allowExp;
-    Display *display = QX11Info::display();
-
-    XGetScreenSaver(display, &timeout, &interval, &preferBlank, &allowExp);
-    timeout = gX11ScreenSaverTimeout;
-    XSetScreenSaver(display, timeout, interval, preferBlank, allowExp);
-
-    if (gX11DpmsState && gX11ScreenSaverDpmsAvailable)
-        DPMSEnable(display);
-}
 
 X11WMType X11WindowManagerType()
@@ -123,2 +83,42 @@
 }
 
+void X11ScreenSaverSettingsInit()
+{
+    int     dummy;
+    Display *display = QX11Info::display();
+    gX11ScreenSaverDpmsAvailable = DPMSQueryExtension(display, &dummy, &dummy);
+}
+
+void X11ScreenSaverSettingsSave()
+{
+    /* Actually this is a big mess. By default the libSDL disables the screen saver
+     * during the SDL_InitSubSystem() call and restores the saved settings during
+     * the SDL_QuitSubSystem() call. This mechanism can be disabled by setting the
+     * environment variable SDL_VIDEO_ALLOW_SCREENSAVER to 1. However, there is a
+     * known bug in the Debian libSDL: If this environment variable is set, the
+     * screen saver is still disabled but the old state is not restored during
+     * SDL_QuitSubSystem()! So the only solution to overcome this problem is to
+     * save and restore the state prior and after each of these function calls. */
+
+    int     dummy;
+    CARD16  dummy2;
+    Display *display = QX11Info::display();
+
+    XGetScreenSaver(display, &gX11ScreenSaverTimeout, &dummy, &dummy, &dummy);
+    if (gX11ScreenSaverDpmsAvailable)
+        DPMSInfo(display, &dummy2, &gX11DpmsState);
+}
+
+void X11ScreenSaverSettingsRestore()
+{
+    int     timeout, interval, preferBlank, allowExp;
+    Display *display = QX11Info::display();
+
+    XGetScreenSaver(display, &timeout, &interval, &preferBlank, &allowExp);
+    timeout = gX11ScreenSaverTimeout;
+    XSetScreenSaver(display, timeout, interval, preferBlank, allowExp);
+
+    if (gX11DpmsState && gX11ScreenSaverDpmsAvailable)
+        DPMSEnable(display);
+}
+
Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h	(revision 56929)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h	(revision 56930)
@@ -27,4 +27,7 @@
 };
 
+/** X11: Determines and returns current Window Manager type. */
+X11WMType X11WindowManagerType();
+
 /** X11: Inits the screen saver save/restore mechanism. */
 void X11ScreenSaverSettingsInit();
@@ -34,7 +37,4 @@
 void X11ScreenSaverSettingsRestore();
 
-/** X11: Determines and returns current Window Manager type. */
-X11WMType X11WindowManagerType();
-
 #endif /* !___VBoxX11Helpers_h___ */
 
