Changeset 97888 in vbox
- Timestamp:
- Dec 28, 2022 12:52:28 PM (2 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/VBoxUtils-x11.cpp
r97867 r97888 613 613 } 614 614 615 Display *NativeWindowSubsystem::X11GetDisplay( void)616 { 617 #ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: ...*/618 Display *pDisplay = nullptr;615 Display *NativeWindowSubsystem::X11GetDisplay() 616 { 617 #ifdef VBOX_IS_QT6_OR_LATER /** QX11Info is replaced with QNativeInterface::QX11Application since qt6 */ 618 Display *pDisplay = 0; 619 619 if (qApp) 620 620 { … … 630 630 } 631 631 632 xcb_connection_t *NativeWindowSubsystem::X11GetConnection(void) 633 { 634 #ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: ... */ 632 xcb_connection_t *NativeWindowSubsystem::X11GetConnection() 633 { 634 #ifdef VBOX_IS_QT6_OR_LATER /** QX11Info is replaced with QNativeInterface::QX11Application since qt6 */ 635 xcb_connection_t *pConnection = 0; 635 636 if (qApp) 636 637 { 637 638 QNativeInterface::QX11Application *pX11App = qApp->nativeInterface<QNativeInterface::QX11Application>(); 638 639 if (pX11App) 639 return pX11App->connection(); 640 } 641 return NULL; 640 pConnection = pX11App->connection(); 641 } 642 642 #else 643 returnQX11Info::connection();643 xcb_connection_t *pConnection = QX11Info::connection(); 644 644 #endif 645 } 646 647 uint32_t NativeWindowSubsystem::X11GetAppRootWindow(void) 648 { 649 #ifdef VBOX_IS_QT6_OR_LATER /** @todo qt6: ... */ 645 Assert(pConnection); 646 return pConnection; 647 } 648 649 uint32_t NativeWindowSubsystem::X11GetAppRootWindow() 650 { 651 #ifdef VBOX_IS_QT6_OR_LATER /** QX11Info is replaced with QNativeInterface::QX11Application since qt6 */ 650 652 Window idWindow = 0; 651 653 Display *pDisplay = NativeWindowSubsystem::X11GetDisplay(); 652 654 if (pDisplay) 653 idWindow = DefaultRootWindow(pDisplay); /** @todo qt6: ?? */655 idWindow = DefaultRootWindow(pDisplay); 654 656 return idWindow; 655 657 #else … … 657 659 #endif 658 660 } 659 -
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h
r97867 r97888 130 130 SHARED_LIBRARY_STUFF void X11SetXwaylandMayGrabKeyboardFlag(QWidget *pWidget); 131 131 132 /** X11: Get the X11 display pointer. */ 133 SHARED_LIBRARY_STUFF struct _XDisplay *X11GetDisplay(void); 134 135 /** X11: Get the X11 connection. */ 136 SHARED_LIBRARY_STUFF struct xcb_connection_t *X11GetConnection(void); 137 138 /** X11: Get the X11 root (desktop) window. */ 139 SHARED_LIBRARY_STUFF uint32_t X11GetAppRootWindow(void); 132 /** X11: Gets the X11 display pointer. */ 133 SHARED_LIBRARY_STUFF struct _XDisplay *X11GetDisplay(); 134 /** X11: Gets the X11 connection. */ 135 SHARED_LIBRARY_STUFF struct xcb_connection_t *X11GetConnection(); 136 /** X11: Gets the X11 root (desktop) window. */ 137 SHARED_LIBRARY_STUFF uint32_t X11GetAppRootWindow(); 140 138 } 141 139
Note:
See TracChangeset
for help on using the changeset viewer.