- Timestamp:
- Apr 12, 2023 2:58:56 PM (18 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
-
globals/UICommon.cpp (modified) (2 diffs)
-
manager/UIVirtualBoxManager.cpp (modified) (1 diff)
-
platform/x11/VBoxUtils-x11.cpp (modified) (4 diffs)
-
platform/x11/VBoxUtils-x11.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r99372 r99381 331 331 #ifdef VBOX_WS_X11 332 332 /* Check whether we have compositing manager running: */ 333 m_fCompositingManagerRunning = NativeWindowSubsystem:: X11IsCompositingManagerRunning();333 m_fCompositingManagerRunning = NativeWindowSubsystem::IsCompositingManagerRunning(X11XServerAvailable()); 334 334 335 335 /* Acquire current Window Manager type: */ 336 m_enmWindowManagerType = NativeWindowSubsystem:: X11WindowManagerType();336 m_enmWindowManagerType = NativeWindowSubsystem::WindowManagerType(X11XServerAvailable()); 337 337 #endif /* VBOX_WS_X11 */ 338 338 … … 3027 3027 { 3028 3028 return m_enmDisplayServerType == DisplayServerType_XWayland 3029 ||DisplayServerType_XOrg;3030 } 3031 #endif 3029 || m_enmDisplayServerType == DisplayServerType_XOrg; 3030 } 3031 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r99278 r99381 2114 2114 { 2115 2115 #ifdef VBOX_WS_X11 2116 /* Assign same name to both WM_CLASS name & class for now: */ 2117 NativeWindowSubsystem::X11SetWMClass(this, "VirtualBox Manager", "VirtualBox Manager"); 2116 NativeWindowSubsystem::SetWMClass(uiCommon().X11XServerAvailable(), this, "VirtualBox Manager", "VirtualBox Manager"); 2118 2117 #endif 2119 2118 -
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp
r99372 r99381 60 60 61 61 62 bool NativeWindowSubsystem::IsCompositingManagerRunning(bool fIsXServerAvailable) 63 { 64 if (fIsXServerAvailable) 65 return X11IsCompositingManagerRunning(); 66 return WaylandIsCompositingManagerRunning(); 67 } 62 68 bool NativeWindowSubsystem::X11IsCompositingManagerRunning() 63 69 { … … 67 73 Atom atom_property_name = XInternAtom(pDisplay, "_NET_WM_CM_S0", True); 68 74 return XGetSelectionOwner(pDisplay, atom_property_name); 75 } 76 77 bool NativeWindowSubsystem::WaylandIsCompositingManagerRunning() 78 { 79 /// @todo implement 80 return true; 81 } 82 83 X11WMType NativeWindowSubsystem::WindowManagerType(bool fIsXServerAvailable) 84 { 85 if (fIsXServerAvailable) 86 return X11WindowManagerType(); 87 return WaylandWindowManagerType(); 88 } 89 90 X11WMType NativeWindowSubsystem::WaylandWindowManagerType() 91 { 92 /// @todo implement 93 return X11WMType_Unknown; 69 94 } 70 95 … … 590 615 } 591 616 617 void NativeWindowSubsystem::SetWMClass(bool fIsXServerAvailable, QWidget *pWidget, const QString &strNameString, const QString &strClassString) 618 { 619 if (fIsXServerAvailable) 620 X11SetWMClass(pWidget, strNameString, strClassString); 621 else 622 WaylandSetWMClass(pWidget, strNameString, strClassString); 623 } 624 592 625 void NativeWindowSubsystem::X11SetWMClass(QWidget *pWidget, const QString &strNameString, const QString &strClassString) 593 626 { … … 614 647 } 615 648 649 void NativeWindowSubsystem::WaylandSetWMClass(QWidget *pWidget, const QString &strNameString, const QString &strClassString) 650 { 651 Q_UNUSED(pWidget); 652 Q_UNUSED(strNameString); 653 Q_UNUSED(strClassString); 654 /// @todo implement 655 } 656 616 657 void NativeWindowSubsystem::X11SetXwaylandMayGrabKeyboardFlag(QWidget *pWidget) 617 658 { -
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h
r99372 r99381 104 104 namespace NativeWindowSubsystem 105 105 { 106 /** Wrapper function for X11IsCompositingManagerRunning and WaylandIsCompositingManagerRunning. */ 107 bool IsCompositingManagerRunning(bool fIsXServerAvailable); 106 108 /** X11: Determines and returns whether the compositing manager is running. */ 107 109 bool X11IsCompositingManagerRunning(); 110 /** Wayland: Determines and returns whether the compositing manager is running. */ 111 bool WaylandIsCompositingManagerRunning(); 112 113 /** Wrapper for window manager type functions. */ 114 X11WMType WindowManagerType(bool fIsXServerAvailable); 108 115 /** X11: Determines and returns current Window Manager type. */ 109 116 X11WMType X11WindowManagerType(); 117 /** Wayland: Determines and returns current Window Manager type. */ 118 X11WMType WaylandWindowManagerType(); 110 119 111 120 /** X11: Returns true if XLib extension with name @p extensionName is avaible, false otherwise. */ … … 132 141 SHARED_LIBRARY_STUFF void X11SetSkipPagerFlag(QWidget *pWidget); 133 142 143 /** Wrapper function for WMClass setters. */ 144 SHARED_LIBRARY_STUFF void SetWMClass(bool fIsXServerAvailable, QWidget *pWidget, const QString &strNameString, const QString &strClassString); 134 145 /** X11: Assigns WM_CLASS property for passed @a pWidget. */ 135 146 SHARED_LIBRARY_STUFF void X11SetWMClass(QWidget *pWidget, const QString &strNameString, const QString &strClassString); 147 /** Wayland: Assigns WM_CLASS property for passed @a pWidget. */ 148 SHARED_LIBRARY_STUFF void WaylandSetWMClass(QWidget *pWidget, const QString &strNameString, const QString &strClassString); 136 149 137 150 /** X11: Tell the WM we are well behaved wrt Xwayland keyboard-grabs. This will
Note:
See TracChangeset
for help on using the changeset viewer.

