VirtualBox

Changeset 107174 in vbox


Ignore:
Timestamp:
Nov 28, 2024 12:34:10 PM (7 weeks ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10407. When VM window is a wayland client then call winId on machine window instead of view's viewport.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r106703 r107174  
    6262#ifdef VBOX_WS_NIX
    6363# include <X11/Xlib.h>
     64# include "VBoxUtils-nix.h"
    6465# undef Bool // Qt5 vs Xlib gift..
    6566#endif /* VBOX_WS_NIX */
     
    452453    /* Reassign index: */
    453454    m_uScreenId = m_pMachineView ? m_pMachineView->screenId() : 0;
    454     /* Recache window ID: */
    455     m_iWinId = (m_pMachineView && m_pMachineView->viewport()) ? (LONG64)m_pMachineView->viewport()->winId() : 0;
    456455
    457456#ifdef VBOX_WS_NIX
     
    459458        /* Resync Qt and X11 Server (see xTracker #7547). */
    460459        XSync(NativeWindowSubsystem::X11GetDisplay(), false);
     460    if (NativeWindowSubsystem::displayServerType() == VBGHDISPLAYSERVERTYPE_PURE_WAYLAND)
     461        m_iWinId = (m_pMachineView && m_pMachineView->machineWindow()) ? (LONG64)m_pMachineView->machineWindow()->winId() : 0;
     462    else
     463        m_iWinId = (m_pMachineView && m_pMachineView->viewport()) ? (LONG64)m_pMachineView->viewport()->winId() : 0;
     464#else
     465    /* Recache window ID: */
     466    m_iWinId = (m_pMachineView && m_pMachineView->viewport()) ? (LONG64)m_pMachineView->viewport()->winId() : 0;
    461467#endif
    462468
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette