Changeset 71544 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 28, 2018 3:35:23 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/platform/x11
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp
r69500 r71544 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - X11 helpers..3 * VBox Qt GUI - VBox X11 helper functions. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2008-201 7Oracle Corporation7 * Copyright (C) 2008-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 17 17 18 18 /* Qt includes: */ 19 #include <QString> 19 20 #include <QX11Info> 20 #include <QString>21 21 22 22 /* GUI includes: */ … … 26 26 #include <iprt/cdefs.h> 27 27 28 /* rhel3 build hack */ 28 // WORKAROUND: 29 // rhel3 build hack 29 30 RT_C_DECLS_BEGIN 30 31 #include <X11/Xatom.h> … … 32 33 #include <X11/extensions/dpms.h> 33 34 RT_C_DECLS_END 35 34 36 35 37 static int gX11ScreenSaverTimeout; … … 108 110 { 109 111 int dummy; 110 Display * display = QX11Info::display();111 gX11ScreenSaverDpmsAvailable = DPMSQueryExtension( display, &dummy, &dummy);112 Display *pDisplay = QX11Info::display(); 113 gX11ScreenSaverDpmsAvailable = DPMSQueryExtension(pDisplay, &dummy, &dummy); 112 114 } 113 115 … … 125 127 int dummy; 126 128 CARD16 dummy2; 127 Display * display = QX11Info::display();129 Display *pDisplay = QX11Info::display(); 128 130 129 XGetScreenSaver( display, &gX11ScreenSaverTimeout, &dummy, &dummy, &dummy);131 XGetScreenSaver(pDisplay, &gX11ScreenSaverTimeout, &dummy, &dummy, &dummy); 130 132 if (gX11ScreenSaverDpmsAvailable) 131 DPMSInfo( display, &dummy2, &gX11DpmsState);133 DPMSInfo(pDisplay, &dummy2, &gX11DpmsState); 132 134 } 133 135 134 136 void X11ScreenSaverSettingsRestore() 135 137 { 136 int timeout, interval, preferBlank, allowExp;137 Display * display = QX11Info::display();138 int iTimeout, iInterval, iPreferBlank, iAllowExp; 139 Display *pDisplay = QX11Info::display(); 138 140 139 XGetScreenSaver( display, &timeout, &interval, &preferBlank, &allowExp);140 timeout = gX11ScreenSaverTimeout;141 XSetScreenSaver( display, timeout, interval, preferBlank, allowExp);141 XGetScreenSaver(pDisplay, &iTimeout, &iInterval, &iPreferBlank, &iAllowExp); 142 iTimeout = gX11ScreenSaverTimeout; 143 XSetScreenSaver(pDisplay, iTimeout, iInterval, iPreferBlank, iAllowExp); 142 144 143 145 if (gX11DpmsState && gX11ScreenSaverDpmsAvailable) 144 DPMSEnable( display);146 DPMSEnable(pDisplay); 145 147 } 146 148 -
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h
r69500 r71544 5 5 6 6 /* 7 * Copyright (C) 2006-201 7Oracle Corporation7 * Copyright (C) 2006-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 19 19 #define ___VBoxX11Helpers_h___ 20 20 21 21 22 /** X11: Known Window Manager types. */ 22 23 enum X11WMType … … 30 31 X11WMType_Xfwm4, 31 32 }; 33 32 34 33 35 /** X11: Determines and returns whether the compositing manager is running. */ … … 44 46 void X11ScreenSaverSettingsRestore(); 45 47 48 46 49 #endif /* !___VBoxX11Helpers_h___ */ 47 50
Note:
See TracChangeset
for help on using the changeset viewer.