mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 19:49:49 +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)
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue