diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-31 21:47:03 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-31 21:47:03 +0200 |
| commit | a3860e99cb0cbdfa17337e762931f7de2a9494e5 (patch) | |
| tree | 2ce54a9f0976e143ad46eada38de1c178f499d8d /src | |
| parent | c63225b33243d581a2d57de8dbc8423f3a044cfc (diff) | |
modify unfocus behavior
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compositor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index df32f1ce..b2947025 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -348,8 +348,9 @@ void CCompositor::focusSurface(wlr_surface* pSurface) { if (!pSurface) return; - // Unfocus last surface - if (m_pLastFocus && !wlr_surface_is_xwayland_surface(m_pLastFocus)) + // Unfocus last surface if should + const auto PWINDOWATCURSOR = vectorToWindowIdeal(g_pInputManager->getMouseCoordsInternal()); + if (m_pLastFocus && !(PWINDOWATCURSOR && g_pXWaylandManager->getWindowSurface(PWINDOWATCURSOR) == m_pLastFocus)) g_pXWaylandManager->activateSurface(m_pLastFocus, false); const auto KEYBOARD = wlr_seat_get_keyboard(m_sSeat.seat); |
