aboutsummaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 393a2181..f95683d0 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -15,9 +15,14 @@ static struct wlc_origin mouse_origin;
static bool pointer_test(swayc_t *view, void *_origin) {
const struct wlc_origin *origin = _origin;
+ //Determine the output that the view is under
+ swayc_t *parent = view;
+ while (parent->type != C_OUTPUT) {
+ parent = parent->parent;
+ }
if (view->type == C_VIEW && origin->x >= view->x && origin->y >= view->y
&& origin->x < view->x + view->width && origin->y < view->y + view->height
- && view->visible) {
+ && view->visible && parent == root_container.focused) {
return true;
}
return false;
@@ -254,4 +259,3 @@ struct wlc_interface interface = {
.ready = handle_wlc_ready
}
};
-