Changeset 58880 in vbox
- Timestamp:
- Nov 26, 2015 1:05:13 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
r57510 r58880 19 19 #include <QApplication> 20 20 #include <QDesktopWidget> 21 #ifdef Q_WS_X1122 # include <QX11Info>23 #endif /* Q_WS_X11 */24 21 25 22 /* GUI includes: */ 23 #include "VBoxGlobal.h" 26 24 #include "UIDesktopWidgetWatchdog.h" 27 25 28 26 /* Other VBox includes: */ 29 27 #include <iprt/assert.h> 28 30 29 31 30 /** QWidget extension used as … … 67 66 #ifdef Q_WS_X11 68 67 /* For composite WMs make this 1 pixel transparent: */ 69 if ( QX11Info::isCompositingManagerRunning())68 if (vboxGlobal().isCompositingManagerRunning()) 70 69 setAttribute(Qt::WA_TranslucentBackground); 71 70 #else /* !Q_WS_X11 */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r58866 r58880 231 231 , m_pMediumEnumerator(0) 232 232 #ifdef Q_WS_X11 233 , m_fCompositingManagerRunning(false) 233 234 , m_enmWindowManagerType(X11WMType_Unknown) 234 235 , m_pDesktopWidgetWatchdog(0) … … 3365 3366 bool VBoxGlobal::setFullScreenMonitorX11(QWidget *pWidget, ulong uScreenId) 3366 3367 { 3367 return XXSendClientMessage( pWidget->x11Info().display(),3368 return XXSendClientMessage(QX11Info::display(), 3368 3369 pWidget->window()->winId(), 3369 3370 "_NET_WM_FULLSCREEN_MONITORS", … … 3376 3377 { 3377 3378 /* Get display: */ 3378 Display *pDisplay = pWidget->x11Info().display();3379 Display *pDisplay = QX11Info::display(); 3379 3380 3380 3381 /* Prepare atoms: */ … … 3420 3421 { 3421 3422 /* Get display: */ 3422 Display *pDisplay = pWidget->x11Info().display();3423 Display *pDisplay = QX11Info::display(); 3423 3424 3424 3425 /* Prepare atoms: */ … … 3433 3434 { 3434 3435 /* Get display: */ 3435 Display *pDisplay = pWidget->x11Info().display();3436 Display *pDisplay = QX11Info::display(); 3436 3437 3437 3438 /* Prepare atoms: */ … … 4048 4049 4049 4050 #ifdef Q_WS_X11 4051 /* Check whether we have compositing manager running: */ 4052 m_fCompositingManagerRunning = X11IsCompositingManagerRunning(); 4053 4050 4054 /* Acquire current Window Manager type: */ 4051 4055 m_enmWindowManagerType = X11WindowManagerType(); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r58360 r58880 207 207 208 208 #ifdef Q_WS_X11 209 /** X11: Returns whether the Window Manager we are running at is composition one. */ 210 bool isCompositingManagerRunning() const { return m_fCompositingManagerRunning; } 209 211 /** X11: Returns the type of the Window Manager we are running under. */ 210 212 X11WMType typeOfWindowManager() const { return m_enmWindowManagerType; } … … 568 570 569 571 #ifdef Q_WS_X11 572 /** X11: Holds whether the Window Manager we are running at is composition one. */ 573 bool m_fCompositingManagerRunning; 570 574 /** X11: Holds the type of the Window Manager we are running under. */ 571 575 X11WMType m_enmWindowManagerType; -
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp
r57101 r58880 36 36 static BOOL gX11ScreenSaverDpmsAvailable; 37 37 static BOOL gX11DpmsState; 38 39 bool X11IsCompositingManagerRunning() 40 { 41 /* Get display: */ 42 Display *pDisplay = QX11Info::display(); 43 /* For each screen it manage, compositing manager MUST acquire ownership 44 * of a selection named _NET_WM_CM_Sn, where n is the screen number. */ 45 Atom atom_property_name = XInternAtom(pDisplay, "_NET_WM_CM_S0", True); 46 return XGetSelectionOwner(pDisplay, atom_property_name); 47 } 38 48 39 49 X11WMType X11WindowManagerType() -
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h
r57101 r58880 30 30 }; 31 31 32 /** X11: Determines and returns whether the compositing manager is running. */ 33 bool X11IsCompositingManagerRunning(); 34 32 35 /** X11: Determines and returns current Window Manager type. */ 33 36 X11WMType X11WindowManagerType(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISlidingToolBar.cpp
r52786 r58880 24 24 # include <QHBoxLayout> 25 25 # include <QMdiArea> 26 # ifdef Q_WS_X1127 # include <QX11Info>28 # endif /* Q_WS_X11 */29 26 30 27 /* GUI includes: */ 28 # include "VBoxGlobal.h" 31 29 # include "UISlidingToolBar.h" 32 30 # include "UIAnimationFramework.h" … … 80 78 setAttribute(Qt::WA_TranslucentBackground); 81 79 #elif defined(Q_WS_X11) 82 if ( QX11Info::isCompositingManagerRunning())80 if (vboxGlobal().isCompositingManagerRunning()) 83 81 { 84 82 /* Use Qt API to enable translucency: */ … … 157 155 158 156 #ifdef Q_WS_X11 159 if (! QX11Info::isCompositingManagerRunning())157 if (!vboxGlobal().isCompositingManagerRunning()) 160 158 { 161 159 /* Use Xshape otherwise: */ … … 214 212 215 213 #ifdef Q_WS_X11 216 if (! QX11Info::isCompositingManagerRunning())214 if (!vboxGlobal().isCompositingManagerRunning()) 217 215 { 218 216 /* Use Xshape otherwise: */ … … 306 304 307 305 #ifdef Q_WS_X11 308 if (! QX11Info::isCompositingManagerRunning())306 if (!vboxGlobal().isCompositingManagerRunning()) 309 307 { 310 308 /* Use Xshape otherwise: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r57591 r58880 30 30 # include <QStateMachine> 31 31 # include <QPainter> 32 # ifdef Q_WS_X1133 # include <QX11Info>34 # endif /* Q_WS_X11 */35 32 36 33 /* GUI includes: */ … … 276 273 /* Left margin: */ 277 274 #ifdef Q_WS_X11 278 if ( QX11Info::isCompositingManagerRunning())275 if (vboxGlobal().isCompositingManagerRunning()) 279 276 m_spacings << widgetForAction(addWidget(new QWidget)); 280 277 #else /* !Q_WS_X11 */ … … 331 328 /* Right margin: */ 332 329 #ifdef Q_WS_X11 333 if ( QX11Info::isCompositingManagerRunning())330 if (vboxGlobal().isCompositingManagerRunning()) 334 331 m_spacings << widgetForAction(addWidget(new QWidget)); 335 332 #else /* !Q_WS_X11 */ … … 344 341 { 345 342 #ifdef Q_WS_X11 346 if (! QX11Info::isCompositingManagerRunning())343 if (!vboxGlobal().isCompositingManagerRunning()) 347 344 return; 348 345 #endif /* Q_WS_X11 */ … … 553 550 #elif defined(Q_WS_X11) 554 551 /* Enable translucency through Qt API if supported: */ 555 if ( QX11Info::isCompositingManagerRunning())552 if (vboxGlobal().isCompositingManagerRunning()) 556 553 setAttribute(Qt::WA_TranslucentBackground); 557 554 #endif /* Q_WS_X11 */
Note:
See TracChangeset
for help on using the changeset viewer.