+# ifdef X_XF86VidModeSetViewPort
+
+ if (fgDisplay.DisplayModeValid) {
+ int x, y;
+ Window child;
+
+ /*
+ * Change to viewport to the window topleft edge:
+ */
+ XF86VidModeSetViewPort(fgDisplay.Display, fgDisplay.Screen, 0, 0);
+
+ /*
+ * Final window repositioning: It could be avoided using an undecorated
+ * window using override_redirect, but this * would possily require more
+ * changes and investigation.
+ */
+
+ /* Get the current postion of the drawable area on screen */
+ XTranslateCoordinates(
+ fgDisplay.Display,
+ fgStructure.Window->Window.Handle,
+ fgDisplay.RootWindow,
+ 0, 0, &x, &y,
+ &child
+ );
+
+ /* Move the decorataions out of the topleft corner of the display */
+ XMoveWindow(fgDisplay.Display, fgStructure.Window->Window.Handle, -x, -y);
+ }
+
+#endif
+