Changeset 57015 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 20, 2015 10:08:34 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101733
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r56932 r57015 3327 3327 pPropWidget->window()->winId()); 3328 3328 } 3329 3330 /* static */3331 void VBoxGlobal::representAsToolbar(QWidget *pWidget)3332 {3333 /* Get display: */3334 Display *pDisplay = pWidget->x11Info().display();3335 3336 /* Prepare a name of the property as the key: */3337 Atom net_wm_window_type = XInternAtom(pDisplay, "_NET_WM_WINDOW_TYPE", false);3338 /* Prepare a type of the property as the value: */3339 Atom net_wm_window_type_toolbar = XInternAtom(pDisplay, "_NET_WM_WINDOW_TYPE_TOOLBAR", false);3340 3341 /* Populate values array: */3342 long data[1];3343 data[0] = net_wm_window_type_toolbar;3344 3345 /* Assign the property for the passed widget: */3346 XChangeProperty(pWidget->x11Info().display(),3347 pWidget->window()->winId(),3348 net_wm_window_type, XA_ATOM, 32,3349 PropModeReplace, (unsigned char*)&data, 1L);3350 }3351 3329 #endif /* Q_WS_X11 */ 3352 3330 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r56932 r57015 363 363 /** X11: Ensures @a pPropWidget become transient for the @a pWidget. */ 364 364 static void setTransientFor(QWidget *pWidget, QWidget *pPropWidget); 365 /** X11: Represents @a pWidget as X11 tool-bar. */366 static void representAsToolbar(QWidget *pWidget);367 365 #endif /* Q_WS_X11 */ 368 366 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r56935 r57015 51 51 Qt::Alignment alignment, 52 52 bool fAutoHide /* = true */) 53 : QWidget(pParent, 54 #if defined(Q_WS_WIN) 55 Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint 56 #elif defined(Q_WS_MAC) || defined(Q_WS_X11) 57 Qt::Window | Qt::FramelessWindowHint 58 #endif /* Q_WS_MAC || Q_WS_X11 */ 59 ) 53 : QWidget(pParent, Qt::Tool | Qt::FramelessWindowHint) 60 54 /* Variables: General stuff: */ 61 55 , m_geometryType(geometryType) … … 321 315 if (QX11Info::isCompositingManagerRunning()) 322 316 setAttribute(Qt::WA_TranslucentBackground); 323 #endif /* Q_WS_X11 */324 325 #ifdef Q_WS_X11326 /* Certain WMs requires some X11 magic327 * to make tool-bar be always-on-top328 * of corresponding machine-window. */329 switch (vboxGlobal().typeOfWindowManager())330 {331 case X11WMType_Mutter:332 case X11WMType_GnomeShell:333 VBoxGlobal::representAsToolbar(this);334 break;335 default:336 break;337 }338 317 #endif /* Q_WS_X11 */ 339 318
Note:
See TracChangeset
for help on using the changeset viewer.