summaryrefslogtreecommitdiff
path: root/src/events/Layers.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-14 21:33:36 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-14 21:33:36 +0200
commit642af5395e19d696be0cbf217a92d2a1e723e17a (patch)
tree307935e2c11d7bdd3a50263e5adb78474a2c5be7 /src/events/Layers.cpp
parent316589406f948c3e4d8a32083600d0b32582a460 (diff)
dont focus anything on constrained
Diffstat (limited to 'src/events/Layers.cpp')
-rw-r--r--src/events/Layers.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp
index 45f20870..0e2f49d5 100644
--- a/src/events/Layers.cpp
+++ b/src/events/Layers.cpp
@@ -99,8 +99,6 @@ void Events::listener_mapLayerSurface(void* owner, void* data) {
layersurface->layerSurface->mapped = true;
- wlr_surface_send_enter(layersurface->layerSurface->surface, layersurface->layerSurface->output);
-
// fix if it changed its mon
const auto PMONITOR = g_pCompositor->getMonitorFromOutput(layersurface->layerSurface->output);
@@ -118,13 +116,14 @@ void Events::listener_mapLayerSurface(void* owner, void* data) {
g_pHyprRenderer->arrangeLayersForMonitor(PMONITOR->ID);
- if (layersurface->layerSurface->current.keyboard_interactive && (!g_pCompositor->m_sSeat.mouse || !g_pCompositor->m_sSeat.mouse->currentConstraint)) // don't focus if constrained
+ if (layersurface->layerSurface->current.keyboard_interactive && (!g_pCompositor->m_sSeat.mouse || !g_pCompositor->m_sSeat.mouse->currentConstraint)) { // don't focus if constrained
+ wlr_surface_send_enter(layersurface->layerSurface->surface, layersurface->layerSurface->output);
g_pCompositor->focusSurface(layersurface->layerSurface->surface);
- // mouse enter always, keeb only when needed
- const auto LOCAL = g_pInputManager->getMouseCoordsInternal() - Vector2D(layersurface->geometry.x + PMONITOR->vecPosition.x, layersurface->geometry.y + PMONITOR->vecPosition.y);
- wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, layersurface->layerSurface->surface, LOCAL.x, LOCAL.y);
- wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, 0, LOCAL.x, LOCAL.y);
+ const auto LOCAL = g_pInputManager->getMouseCoordsInternal() - Vector2D(layersurface->geometry.x + PMONITOR->vecPosition.x, layersurface->geometry.y + PMONITOR->vecPosition.y);
+ wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, layersurface->layerSurface->surface, LOCAL.x, LOCAL.y);
+ wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, 0, LOCAL.x, LOCAL.y);
+ }
layersurface->position = Vector2D(layersurface->geometry.x, layersurface->geometry.y);