From ff26531e11b55854c5937dac2f2ba121c78e11b9 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 4 Sep 2022 11:29:49 +0200 Subject: [PATCH] use activateSurface in unconstrainMouse --- src/managers/input/InputManager.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index ada25565..e4173a6d 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -903,11 +903,7 @@ void CInputManager::unconstrainMouse() { const auto CONSTRAINTWINDOW = g_pCompositor->getConstraintWindow(g_pCompositor->m_sSeat.mouse); if (CONSTRAINTWINDOW) { - if (CONSTRAINTWINDOW->m_bIsX11) { - wlr_xwayland_surface_activate(CONSTRAINTWINDOW->m_uSurface.xwayland, false); - } else { - wlr_xdg_toplevel_set_activated(CONSTRAINTWINDOW->m_uSurface.xdg->toplevel, false); - } + g_pXWaylandManager->activateSurface(g_pXWaylandManager->getWindowSurface(CONSTRAINTWINDOW), false); } wlr_pointer_constraint_v1_send_deactivated(g_pCompositor->m_sSeat.mouse->currentConstraint);