VirtualBox

Changeset 61884 in vbox for trunk


Ignore:
Timestamp:
Jun 24, 2016 4:17:15 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:5978: Runtime UI: Mini-toolbar: Workaround for Unity (Compiz) which sometimes forgets to move Qt::Tool mini-toolbar to full-screen.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp

    r61858 r61884  
    380380}
    381381
     382/* static */
     383Qt::WindowFlags UIMiniToolBar::defaultWindowFlags()
     384{
     385#ifdef VBOX_WS_X11
     386    /* Depending on current WM: */
     387    switch (vboxGlobal().typeOfWindowManager())
     388    {
     389        /* Frameless top-level window for Unity, issues with tool window there.. */
     390        case X11WMType_Compiz: return Qt::Window | Qt::FramelessWindowHint;
     391        default: break;
     392    }
     393#endif /* VBOX_WS_X11 */
     394
     395    /* Frameless tool window by default: */
     396    return Qt::Tool | Qt::FramelessWindowHint;
     397}
     398
    382399UIMiniToolBar::UIMiniToolBar(QWidget *pParent,
    383400                             GeometryType geometryType,
    384401                             Qt::Alignment alignment,
    385402                             bool fAutoHide /* = true */)
    386     : QWidget(pParent, Qt::Tool | Qt::FramelessWindowHint)
     403    : QWidget(pParent, defaultWindowFlags())
    387404    /* Variables: General stuff: */
    388405    , m_geometryType(geometryType)
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h

    r57050 r61884  
    6565
    6666public:
     67
     68    /** Proposes default set of window flags for particular platform. */
     69    static Qt::WindowFlags defaultWindowFlags();
    6770
    6871    /** Constructor, passes @a pParent to the QWidget constructor.
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