Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp	(revision 63040)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp	(revision 63041)
@@ -126,4 +126,16 @@
 }
 
+int UIDesktopWidgetWatchdog::screenNumber(const QWidget *pWidget) const
+{
+    /* Redirect call to QDesktopWidget: */
+    return QApplication::desktop()->screenNumber(pWidget);
+}
+
+int UIDesktopWidgetWatchdog::screenNumber(const QPoint &point) const
+{
+    /* Redirect call to QDesktopWidget: */
+    return QApplication::desktop()->screenNumber(point);
+}
+
 const QRect UIDesktopWidgetWatchdog::screenGeometry(int iHostScreenIndex /* = -1 */) const
 {
@@ -137,4 +149,16 @@
 }
 
+const QRect UIDesktopWidgetWatchdog::screenGeometry(const QWidget *pWidget) const
+{
+    /* Redirect call to wrapper above: */
+    return screenGeometry(screenNumber(pWidget));
+}
+
+const QRect UIDesktopWidgetWatchdog::screenGeometry(const QPoint &point) const
+{
+    /* Redirect call to wrapper above: */
+    return screenGeometry(screenNumber(point));
+}
+
 const QRect UIDesktopWidgetWatchdog::availableGeometry(int iHostScreenIndex /* = -1 */) const
 {
@@ -143,6 +167,4 @@
         iHostScreenIndex = QApplication::desktop()->primaryScreen();
     AssertReturn(iHostScreenIndex >= 0 && iHostScreenIndex < screenCount(), QRect());
-
-    Q_UNUSED(iHostScreenIndex);
 
 #ifdef VBOX_WS_X11
@@ -154,4 +176,30 @@
 #endif /* !VBOX_WS_X11 */
 }
+
+const QRect UIDesktopWidgetWatchdog::availableGeometry(const QWidget *pWidget) const
+{
+    /* Redirect call to wrapper above: */
+    return availableGeometry(screenNumber(pWidget));
+}
+
+const QRect UIDesktopWidgetWatchdog::availableGeometry(const QPoint &point) const
+{
+    /* Redirect call to wrapper above: */
+    return availableGeometry(screenNumber(point));
+}
+
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+bool UIDesktopWidgetWatchdog::isFakeScreenDetected() const
+{
+    // WORKAROUND:
+    // In 5.6.1 Qt devs taught the XCB plugin to silently swap last detached screen
+    // with a fake one, and there is no API-way to distinguish fake from real one
+    // because all they do is erasing output for the last real screen, keeping
+    // all other screen attributes stale. Gladly output influencing screen name
+    // so we can use that horrible workaround to detect a fake XCB screen.
+    return    qApp->screens().size() == 0 /* zero-screen case is impossible after 5.6.1 */
+           || (qApp->screens().size() == 1 && qApp->screens().first()->name() == ":0.0");
+}
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
 
 void UIDesktopWidgetWatchdog::sltHandleHostScreenCountChanged(int cHostScreenCount)
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h	(revision 63040)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h	(revision 63041)
@@ -56,13 +56,32 @@
     ~UIDesktopWidgetWatchdog();
 
-    /** Returns the host-screen count. */
+    /** Returns the number of host-screens currently available on the system. */
     int screenCount() const;
+
+    /** Returns the index of the screen which contains contains @a pWidget. */
+    int screenNumber(const QWidget *pWidget) const;
+    /** Returns the index of the screen which contains contains @a point. */
+    int screenNumber(const QPoint &point) const;
 
     /** Returns the geometry of the host-screen with @a iHostScreenIndex.
       * @note The default screen is used if @a iHostScreenIndex is -1. */
     const QRect screenGeometry(int iHostScreenIndex = -1) const;
+    /** Returns the geometry of the host-screen which contains @a pWidget. */
+    const QRect screenGeometry(const QWidget *pWidget) const;
+    /** Returns the geometry of the host-screen which contains @a point. */
+    const QRect screenGeometry(const QPoint &point) const;
+
     /** Returns the available-geometry of the host-screen with @a iHostScreenIndex.
       * @note The default screen is used if @a iHostScreenIndex is -1. */
     const QRect availableGeometry(int iHostScreenIndex = -1) const;
+    /** Returns the available-geometry of the host-screen which contains @a pWidget. */
+    const QRect availableGeometry(const QWidget *pWidget) const;
+    /** Returns the available-geometry of the host-screen which contains @a point. */
+    const QRect availableGeometry(const QPoint &point) const;
+
+#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
+    /** Qt5: X11: Returns whether no or fake screen detected. */
+    bool isFakeScreenDetected() const;
+#endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
 
 private slots:
