mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 22:05:58 +01:00
modify unfocus behavior
This commit is contained in:
parent
c63225b332
commit
a3860e99cb
1 changed files with 3 additions and 2 deletions
|
@ -348,8 +348,9 @@ void CCompositor::focusSurface(wlr_surface* pSurface) {
|
||||||
if (!pSurface)
|
if (!pSurface)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Unfocus last surface
|
// Unfocus last surface if should
|
||||||
if (m_pLastFocus && !wlr_surface_is_xwayland_surface(m_pLastFocus))
|
const auto PWINDOWATCURSOR = vectorToWindowIdeal(g_pInputManager->getMouseCoordsInternal());
|
||||||
|
if (m_pLastFocus && !(PWINDOWATCURSOR && g_pXWaylandManager->getWindowSurface(PWINDOWATCURSOR) == m_pLastFocus))
|
||||||
g_pXWaylandManager->activateSurface(m_pLastFocus, false);
|
g_pXWaylandManager->activateSurface(m_pLastFocus, false);
|
||||||
|
|
||||||
const auto KEYBOARD = wlr_seat_get_keyboard(m_sSeat.seat);
|
const auto KEYBOARD = wlr_seat_get_keyboard(m_sSeat.seat);
|
||||||
|
|
Loading…
Reference in a new issue