VirtualBox

Changeset 63227 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Aug 9, 2016 4:55:19 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8422: Desktop-widget watchdog rework (part 15): Extend interface with few more advanced required wrappers.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp

    r63175 r63227  
    227227}
    228228
     229const QRegion UIDesktopWidgetWatchdog::overallScreenRegion() const
     230{
     231    /* Calculate region: */
     232    QRegion region;
     233    for (int iScreenIndex = 0; iScreenIndex < gpDesktop->screenCount(); ++iScreenIndex)
     234    {
     235        /* Get enumerated screen's available area: */
     236        QRect rect = gpDesktop->screenGeometry(iScreenIndex);
     237#ifdef VBOX_WS_WIN
     238        /* On Windows host window can exceed the available
     239         * area in maximized/sticky-borders state: */
     240        rect.adjust(-10, -10, 10, 10);
     241#endif /* VBOX_WS_WIN */
     242        /* Append rectangle: */
     243        region += rect;
     244    }
     245    /* Return region: */
     246    return region;
     247}
     248
     249const QRegion UIDesktopWidgetWatchdog::overallAvailableRegion() const
     250{
     251    /* Calculate region: */
     252    QRegion region;
     253    for (int iScreenIndex = 0; iScreenIndex < gpDesktop->screenCount(); ++iScreenIndex)
     254    {
     255        /* Get enumerated screen's available area: */
     256        QRect rect = gpDesktop->availableGeometry(iScreenIndex);
     257#ifdef VBOX_WS_WIN
     258        /* On Windows host window can exceed the available
     259         * area in maximized/sticky-borders state: */
     260        rect.adjust(-10, -10, 10, 10);
     261#endif /* VBOX_WS_WIN */
     262        /* Append rectangle: */
     263        region += rect;
     264    }
     265    /* Return region: */
     266    return region;
     267}
     268
    229269#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
    230270bool UIDesktopWidgetWatchdog::isFakeScreenDetected() const
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h

    r63173 r63227  
    9393    const QRect availableGeometry(const QPoint &point) const;
    9494
     95    /** Returns overall region unifying all the host-screen geometries. */
     96    const QRegion overallScreenRegion() const;
     97    /** Returns overall region unifying all the host-screen available-geometries. */
     98    const QRegion overallAvailableRegion() const;
     99
    95100#if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000
    96101    /** Qt5: X11: Returns whether no or fake screen detected. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette