diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-10-28 19:18:10 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-10-28 19:18:10 +0100 |
| commit | f7174acc4850ac93feb291707de9d9861c9fab56 (patch) | |
| tree | 991cdb86a380bf26acc31b2ea74cb48b9558f550 /src/Compositor.cpp | |
| parent | c2cd718e894f5ba9bba2a8ef7783204e9f3b62ea (diff) | |
minor fixes for xwayland refocus
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 1bab19ab..fccd43c2 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -715,6 +715,8 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { if (windowValidMapped(PLASTWINDOW)) { updateWindowAnimatedDecorationValues(PLASTWINDOW); + g_pXWaylandManager->activateWindow(PLASTWINDOW, false); + if (PLASTWINDOW->m_phForeignToplevel) wlr_foreign_toplevel_handle_v1_set_activated(PLASTWINDOW->m_phForeignToplevel, false); } @@ -750,10 +752,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { if (windowValidMapped(PLASTWINDOW)) { updateWindowAnimatedDecorationValues(PLASTWINDOW); - if (PLASTWINDOW->m_bIsX11) { - wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat); - wlr_seat_pointer_clear_focus(m_sSeat.seat); - } + g_pXWaylandManager->activateWindow(PLASTWINDOW, false); if (PLASTWINDOW->m_phForeignToplevel) wlr_foreign_toplevel_handle_v1_set_activated(PLASTWINDOW->m_phForeignToplevel, false); @@ -788,7 +787,7 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) { return; // Don't focus when already focused on this. // Unfocus last surface if should - if (m_pLastFocus && ((m_sSeat.seat->keyboard_state.focused_surface && wlr_surface_is_xdg_surface(m_pLastFocus)) || !pSurface)) + if (m_pLastFocus && !pWindowOwner) g_pXWaylandManager->activateSurface(m_pLastFocus, false); if (!pSurface) { |
