From 403fd7d9f6b160dec71456c9fb195a4199134eff Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 18 Dec 2023 00:15:30 +0000 Subject: [PATCH] xwayland: move commit handler connect to associate fixes #4179 --- src/events/Windows.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 699d72a1..a7e42b35 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -1189,12 +1189,14 @@ void Events::listener_associateX11(void* owner, void* data) { const auto PWINDOW = (CWindow*)owner; PWINDOW->hyprListener_mapWindow.initCallback(&PWINDOW->m_uSurface.xwayland->surface->events.map, &Events::listener_mapWindow, PWINDOW, "XWayland Window"); + PWINDOW->hyprListener_commitWindow.initCallback(&PWINDOW->m_uSurface.xwayland->surface->events.commit, &Events::listener_commitWindow, PWINDOW, "XWayland Window"); } void Events::listener_dissociateX11(void* owner, void* data) { const auto PWINDOW = (CWindow*)owner; PWINDOW->hyprListener_mapWindow.removeCallback(); + PWINDOW->hyprListener_commitWindow.removeCallback(); } void Events::listener_surfaceXWayland(wl_listener* listener, void* data) { @@ -1217,7 +1219,6 @@ void Events::listener_surfaceXWayland(wl_listener* listener, void* data) { PNEWWINDOW->hyprListener_destroyWindow.initCallback(&XWSURFACE->events.destroy, &Events::listener_destroyWindow, PNEWWINDOW, "XWayland Window"); PNEWWINDOW->hyprListener_setOverrideRedirect.initCallback(&XWSURFACE->events.set_override_redirect, &Events::listener_setOverrideRedirect, PNEWWINDOW, "XWayland Window"); PNEWWINDOW->hyprListener_configureX11.initCallback(&XWSURFACE->events.request_configure, &Events::listener_configureX11, PNEWWINDOW, "XWayland Window"); - PNEWWINDOW->hyprListener_commitWindow.initCallback(&XWSURFACE->surface->events.commit, &Events::listener_commitWindow, PNEWWINDOW, "XWayland Window"); } void Events::listener_newXDGToplevel(wl_listener* listener, void* data) {