Changeset 91065 in vbox
- Timestamp:
- Sep 1, 2021 3:41:42 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/platform/x11
- Files:
-
- 2 edited
-
VBoxUtils-x11.cpp (modified) (7 diffs)
-
VBoxUtils-x11.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
r91057 r91065 29 29 30 30 /* Other VBox includes: */ 31 #include <iprt/cdefs.h>32 31 #include <VBox/log.h> 33 32 33 /* Other includes: */ 34 #include <X11/Xatom.h> 35 #include <X11/Xutil.h> 36 #include <X11/extensions/dpms.h> 37 38 /// @todo is it required still? 34 39 // WORKAROUND: 35 40 // rhel3 build hack 36 RT_C_DECLS_BEGIN 37 #include <X11/Xatom.h> 38 #include <X11/Xlib.h> 39 #undef BOOL /* VBox/com/defs.h conflict */ 40 #include <X11/extensions/dpms.h> 41 RT_C_DECLS_END 42 43 44 static int gX11ScreenSaverTimeout; 45 static BOOL gX11ScreenSaverDpmsAvailable; 46 static BOOL gX11DpmsState; 41 //RT_C_DECLS_BEGIN 42 //#include <X11/Xlib.h> 43 //#undef BOOL /* VBox/com/defs.h conflict */ 44 //RT_C_DECLS_END 45 47 46 48 47 bool NativeWindowSubsystem::X11IsCompositingManagerRunning() … … 110 109 } 111 110 111 #if 0 // unused for now? 112 static int gX11ScreenSaverTimeout; 113 static BOOL gX11ScreenSaverDpmsAvailable; 114 static BOOL gX11DpmsState; 115 112 116 void NativeWindowSubsystem::X11ScreenSaverSettingsInit() 113 117 { … … 148 152 DPMSEnable(pDisplay); 149 153 } 154 #endif // unused for now? 150 155 151 156 bool NativeWindowSubsystem::X11CheckExtension(const char *pExtensionName) … … 159 164 } 160 165 161 bool NativeWindowSubsystem::X11CheckDBusConnection(const QDBusConnection &connection)166 bool X11CheckDBusConnection(const QDBusConnection &connection) 162 167 { 163 168 if (!connection.isConnected()) … … 177 182 } 178 183 179 QStringList NativeWindowSubsystem::X11FindDBusScreenSaverServices(const QDBusConnection &connection)184 QStringList X11FindDBusScreenSaverServices(const QDBusConnection &connection) 180 185 { 181 186 QStringList serviceNames; … … 226 231 } 227 232 228 void NativeWindowSubsystem::X11IntrospectInterfaceNode(const QDomElement &interface,229 const QString &strServiceName,230 QVector<X11ScreenSaverInhibitMethod*> &methods)233 void X11IntrospectInterfaceNode(const QDomElement &interface, 234 const QString &strServiceName, 235 QVector<X11ScreenSaverInhibitMethod*> &methods) 231 236 { 232 237 QDomElement child = interface.firstChildElement(); … … 248 253 } 249 254 250 void NativeWindowSubsystem::X11IntrospectServices(const QDBusConnection &connection,251 const QString &strService,252 const QString &strPath,253 QVector<X11ScreenSaverInhibitMethod*> &methods)255 void X11IntrospectServices(const QDBusConnection &connection, 256 const QString &strService, 257 const QString &strPath, 258 QVector<X11ScreenSaverInhibitMethod*> &methods) 254 259 { 255 260 QDBusMessage call = QDBusMessage::createMethodCall(strService, strPath.isEmpty() ? QLatin1String("/") : strPath, -
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h
r91057 r91065 29 29 #include "UILibraryDefs.h" 30 30 31 /* Forward declarations: */32 class QDBusConnection;33 class QDomElement;34 35 31 /** X11: Known Window Manager types. */ 36 32 enum X11WMType … … 58 54 { 59 55 /** X11: Determines and returns whether the compositing manager is running. */ 60 SHARED_LIBRARY_STUFF bool X11IsCompositingManagerRunning(); 56 bool X11IsCompositingManagerRunning(); 57 /** X11: Determines and returns current Window Manager type. */ 58 X11WMType X11WindowManagerType(); 61 59 62 /** X11: Determines and returns current Window Manager type. */ 63 SHARED_LIBRARY_STUFF X11WMType X11WindowManagerType(); 64 60 #if 0 // unused for now? 65 61 /** X11: Inits the screen saver save/restore mechanism. */ 66 62 SHARED_LIBRARY_STUFF void X11ScreenSaverSettingsInit(); … … 69 65 /** X11: Restores previously saved screen saver settings. */ 70 66 SHARED_LIBRARY_STUFF void X11ScreenSaverSettingsRestore(); 67 #endif // unused for now? 68 71 69 /** X11: Returns true if XLib extension with name @p extensionName is avaible, false otherwise. */ 72 SHARED_LIBRARY_STUFFbool X11CheckExtension(const char *extensionName);70 bool X11CheckExtension(const char *extensionName); 73 71 74 /** X11: Returns whether DBus @a connection is alive. */75 bool X11CheckDBusConnection(const QDBusConnection &connection);76 /** X11: Finds a list of DBus @a connection screen-saver services. */77 QStringList X11FindDBusScreenSaverServices(const QDBusConnection &connection);78 72 /** X11: Returns whether there are any DBus services whose name contains the substring 'screensaver'. */ 79 73 bool X11CheckDBusScreenSaverServices(); 80 /** X11: Does something known only to original creator... */81 void X11IntrospectInterfaceNode(const QDomElement &interface,82 const QString &strServiceName,83 QVector<X11ScreenSaverInhibitMethod*> &methods);84 /** X11: Does something known only to original creator... */85 void X11IntrospectServices(const QDBusConnection &connection,86 const QString &strService,87 const QString &strPath,88 QVector<X11ScreenSaverInhibitMethod*> &methods);89 90 74 /** X11: Returns the list of Inhibit methods found by introspecting DBus services. */ 91 75 SHARED_LIBRARY_STUFF QVector<X11ScreenSaverInhibitMethod*> X11FindDBusScrenSaverInhibitMethods(); 92 93 76 /** X11: Disables/enables Screen Saver through QDBus. */ 94 77 SHARED_LIBRARY_STUFF void X11InhibitUninhibitScrenSaver(bool fInhibit, QVector<X11ScreenSaverInhibitMethod*> &inOutIhibitMethods);
Note:
See TracChangeset
for help on using the changeset viewer.

