Changeset 65797 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Feb 16, 2017 9:34:40 AM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r65554 r65797 399 399 *********************************************************************************************************************************/ 400 400 401 /* static */ 402 Qt::WindowFlags UIMiniToolBar::defaultWindowFlags(GeometryType geometryType) 403 { 404 /* Not everywhere: */ 405 Q_UNUSED(geometryType); 406 407 #ifdef VBOX_WS_X11 408 /* Depending on current WM: */ 409 switch (vboxGlobal().typeOfWindowManager()) 410 { 411 // WORKAROUND: 412 // By strange reason, frameless full-screen windows under certain WMs 413 // do not respect the transient relationship between each other. 414 // By nor less strange reason, frameless full-screen *tool* windows 415 // respects such relationship, so we are doing what WM want. 416 case X11WMType_GNOMEShell: 417 case X11WMType_Metacity: 418 case X11WMType_Mutter: 419 printf("hack\n"); 420 return geometryType == GeometryType_Full ? 421 Qt::Tool | Qt::FramelessWindowHint : 422 Qt::Window | Qt::FramelessWindowHint; 423 default: break; 424 } 425 #endif /* VBOX_WS_X11 */ 426 427 /* Frameless window by default: */ 428 return Qt::Window | Qt::FramelessWindowHint; 429 } 430 401 431 UIMiniToolBar::UIMiniToolBar(QWidget *pParent, 402 432 GeometryType geometryType, 403 433 Qt::Alignment alignment, 404 434 bool fAutoHide /* = true */) 405 : QWidget(0, Qt::Window | Qt::FramelessWindowHint)435 : QWidget(0, defaultWindowFlags(geometryType)) 406 436 /* Variables: General stuff: */ 407 437 , m_pParent(pParent) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h
r65553 r65797 66 66 67 67 public: 68 69 /** Proposes default set of window flags for particular platform. */ 70 static Qt::WindowFlags defaultWindowFlags(GeometryType geometryType); 68 71 69 72 /** Constructor, passes @a pParent to the QWidget constructor.
Note:
See TracChangeset
for help on using the changeset viewer.