aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-05-11 01:02:57 +0100
committerVaxry <[email protected]>2024-05-14 23:13:33 +0100
commitfc72df8e58bc127442a245f2f29a3246acf77cce (patch)
treebe68c03888760af0c2a13bad4aed224fd6adfaa3 /src/Compositor.cpp
parent0cfdde3d1acbfbf698af17f6986fbc4d644214da (diff)
downloadHyprland-fc72df8e58bc127442a245f2f29a3246acf77cce.tar.gz
Hyprland-fc72df8e58bc127442a245f2f29a3246acf77cce.zip
seatmgr: Add a grab class
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index c56dd280..4e0a6357 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1025,6 +1025,11 @@ void CCompositor::focusSurface(wlr_surface* pSurface, PHLWINDOW pWindowOwner) {
if (g_pSessionLockManager->isSessionLocked() && !g_pSessionLockManager->isSurfaceSessionLock(pSurface))
return;
+ if (g_pSeatManager->seatGrab && !g_pSeatManager->seatGrab->accepts(pSurface)) {
+ Debug::log(LOG, "surface {:x} won't receive kb focus becuase grab rejected it", (uintptr_t)pSurface);
+ return;
+ }
+
const auto PLASTSURF = m_pLastFocus;
// Unfocus last surface if should