diff options
author | vaxerski <[email protected]> | 2022-04-18 17:16:01 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-04-18 17:16:01 +0200 |
commit | 7ae87a233c7c2c9c010f947f5d15f2968d03433b (patch) | |
tree | e7c761c875a5f2cb05bec2f78caa375ef69beead /src/Compositor.cpp | |
parent | 8e14f3a08d47586f40233f3736b74fd5c021fe74 (diff) | |
download | Hyprland-7ae87a233c7c2c9c010f947f5d15f2968d03433b.tar.gz Hyprland-7ae87a233c7c2c9c010f947f5d15f2968d03433b.zip |
Inhibit fixes
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r-- | src/Compositor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index a6bd140b..f4da7caf 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -367,6 +367,11 @@ SMonitor* CCompositor::getMonitorFromOutput(wlr_output* out) { void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { + if (g_pCompositor->m_sSeat.exclusiveClient) { + Debug::log(LOG, "Disallowing setting focus to a window due to there being an active input inhibitor layer."); + return; + } + if (!pWindow || !windowValidMapped(pWindow)) { wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat); return; @@ -394,6 +399,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { } void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) { + if (m_sSeat.seat->keyboard_state.focused_surface == pSurface || (pWindowOwner && m_sSeat.seat->keyboard_state.focused_surface == g_pXWaylandManager->getWindowSurface(pWindowOwner))) return; // Don't focus when already focused on this. |