aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorJose Diez <jose.manuel.diez@gmail.com>2015-08-10 22:45:50 +0200
committerJose Diez <jose.manuel.diez@gmail.com>2015-08-10 22:50:26 +0200
commitd8f364a8460aa28cd0e859bfa1e84e37b7bdf6ef (patch)
tree1e3ce3ce540723857b4d77913d350603cd47424a /sway
parent8cc2c6fa7a4b5e8b2d2030033a4bb9f7df45fc42 (diff)
downloadsway-d8f364a8460aa28cd0e859bfa1e84e37b7bdf6ef.tar.xz
workspaces: follow_pointer_mouse doesn't follow hidden containers
Diffstat (limited to 'sway')
-rw-r--r--sway/handlers.c3
-rw-r--r--sway/layout.h4
-rw-r--r--sway/workspace.c1
3 files changed, 6 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 8726a0b2..cdf76554 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -85,7 +85,8 @@ bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers
bool pointer_test(swayc_t *view, void *_origin) {
const struct wlc_origin *origin = _origin;
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) {
+ && origin->x < view->x + view->width && origin->y < view->y + view->height
+ && view->visible) {
return true;
}
return false;
diff --git a/sway/layout.h b/sway/layout.h
index 3a8f8902..c4b193c8 100644
--- a/sway/layout.h
+++ b/sway/layout.h
@@ -29,7 +29,9 @@ struct sway_container {
int x, y;
- int weight;
+ bool visible;
+
+ int weight;
char *name;
diff --git a/sway/workspace.c b/sway/workspace.c
index 1c8cef2c..d88e2786 100644
--- a/sway/workspace.c
+++ b/sway/workspace.c
@@ -40,6 +40,7 @@ void set_mask(swayc_t *view, void *data) {
if(view->type == C_VIEW) {
wlc_view_set_mask(view->handle, *p);
+ view->visible = (*p == 2);
}
}