From fc5cd49795fd412be89b536bd90073dacdd5b7d8 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 28 Jun 2022 14:09:14 +0200 Subject: [PATCH] don't create a surface tree on xwayland windows --- src/events/Windows.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 23175abc..86202929 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -231,8 +231,6 @@ void Events::listener_mapWindow(void* owner, void* data) { if (!PWINDOW->m_bNoFocus && !PWINDOW->m_bNoInitialFocus) g_pCompositor->focusWindow(PWINDOW); - PWINDOW->m_pSurfaceTree = SubsurfaceTree::createTreeRoot(g_pXWaylandManager->getWindowSurface(PWINDOW), addViewCoords, PWINDOW, PWINDOW); - Debug::log(LOG, "Window got assigned a surfaceTreeNode %x", PWINDOW->m_pSurfaceTree); if (!PWINDOW->m_bIsX11) { @@ -270,6 +268,9 @@ void Events::listener_mapWindow(void* owner, void* data) { g_pCompositor->setWindowFullscreen(PWINDOW, true, FULLSCREEN_FULL); } + if (!PWINDOW->m_bIsX11) + PWINDOW->m_pSurfaceTree = SubsurfaceTree::createTreeRoot(g_pXWaylandManager->getWindowSurface(PWINDOW), addViewCoords, PWINDOW, PWINDOW); + Debug::log(LOG, "Map request dispatched, monitor %s, xywh: %f %f %f %f", PMONITOR->szName.c_str(), PWINDOW->m_vRealPosition.goalv().x, PWINDOW->m_vRealPosition.goalv().y, PWINDOW->m_vRealSize.goalv().x, PWINDOW->m_vRealSize.goalv().y); }