aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-05-01 19:50:54 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-05-01 19:50:54 +1000
commit19d6cc395dfcb73fa7fc70a0691a38005afc334f (patch)
tree1839df3c57151c2d1a3295fe55d5248d2200ca95
parenta19a511b90d214f200bfca1cffad0376b855caac (diff)
downloadsway-19d6cc395dfcb73fa7fc70a0691a38005afc334f.tar.xz
Allow clicking view decorations to focus view
-rw-r--r--sway/tree/container.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index cb0233db..995da5ce 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -455,6 +455,16 @@ struct sway_container *container_at(struct sway_container *parent,
*surface = _surface;
return swayc;
}
+ // Check the view's decorations
+ struct wlr_box swayc_box = {
+ .x = swayc->x,
+ .y = swayc->y,
+ .width = swayc->width,
+ .height = swayc->height,
+ };
+ if (wlr_box_contains_point(&swayc_box, ox, oy)) {
+ return swayc;
+ }
} else {
list_cat(queue, swayc->children);
}