diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-01 19:50:54 +1000 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-05-01 07:46:57 -0400 |
commit | 55577498c0b9b3e330351f14704c4bbb0ea10dff (patch) | |
tree | a6d51e43fa70cda7f914c609c3af865ccd6c4667 | |
parent | Implement indicator border (diff) | |
download | sway-55577498c0b9b3e330351f14704c4bbb0ea10dff.tar.gz sway-55577498c0b9b3e330351f14704c4bbb0ea10dff.tar.zst sway-55577498c0b9b3e330351f14704c4bbb0ea10dff.zip |
Allow clicking view decorations to focus view
-rw-r--r-- | sway/tree/container.c | 10 |
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, | |||
455 | *surface = _surface; | 455 | *surface = _surface; |
456 | return swayc; | 456 | return swayc; |
457 | } | 457 | } |
458 | // Check the view's decorations | ||
459 | struct wlr_box swayc_box = { | ||
460 | .x = swayc->x, | ||
461 | .y = swayc->y, | ||
462 | .width = swayc->width, | ||
463 | .height = swayc->height, | ||
464 | }; | ||
465 | if (wlr_box_contains_point(&swayc_box, ox, oy)) { | ||
466 | return swayc; | ||
467 | } | ||
458 | } else { | 468 | } else { |
459 | list_cat(queue, swayc->children); | 469 | list_cat(queue, swayc->children); |
460 | } | 470 | } |