mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 19:06:00 +01:00
xwayland: deactivate xwayland focus if wayland is focused (#7458)
* xwayland: deactivate xwayland focus if wayland is focused * xwayland: deactivate last xwayland surface after focusing wayland
This commit is contained in:
parent
aac90d9279
commit
b672118f92
2 changed files with 5 additions and 2 deletions
|
@ -43,8 +43,11 @@ void CHyprXWaylandManager::activateSurface(SP<CWLSurfaceResource> pSurface, bool
|
||||||
w->m_pXWaylandSurface->restackToTop();
|
w->m_pXWaylandSurface->restackToTop();
|
||||||
}
|
}
|
||||||
w->m_pXWaylandSurface->activate(activate);
|
w->m_pXWaylandSurface->activate(activate);
|
||||||
} else
|
} else {
|
||||||
w->m_pXDGSurface->toplevel->setActive(activate);
|
w->m_pXDGSurface->toplevel->setActive(activate);
|
||||||
|
if (g_pCompositor->m_pLastFocus && g_pCompositor->m_pLastWindow->m_bIsX11)
|
||||||
|
activateSurface(g_pCompositor->m_pLastFocus.lock(), false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -897,7 +897,7 @@ void CXWM::activateSurface(SP<CXWaylandSurface> surf, bool activate) {
|
||||||
if ((surf == focusedSurface && activate) || (surf && surf->overrideRedirect))
|
if ((surf == focusedSurface && activate) || (surf && surf->overrideRedirect))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!surf) {
|
if (!surf || (!activate && g_pCompositor->m_pLastWindow && !g_pCompositor->m_pLastWindow->m_bIsX11)) {
|
||||||
setActiveWindow((uint32_t)XCB_WINDOW_NONE);
|
setActiveWindow((uint32_t)XCB_WINDOW_NONE);
|
||||||
focusWindow(nullptr);
|
focusWindow(nullptr);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue