diff options
author | 2015-08-10 22:45:50 +0200 | |
---|---|---|
committer | 2015-08-10 22:50:26 +0200 | |
commit | d8f364a8460aa28cd0e859bfa1e84e37b7bdf6ef (patch) | |
tree | 1e3ce3ce540723857b4d77913d350603cd47424a | |
parent | Basic workspace functionality (diff) | |
download | sway-d8f364a8460aa28cd0e859bfa1e84e37b7bdf6ef.tar.gz sway-d8f364a8460aa28cd0e859bfa1e84e37b7bdf6ef.tar.zst sway-d8f364a8460aa28cd0e859bfa1e84e37b7bdf6ef.zip |
workspaces: follow_pointer_mouse doesn't follow hidden containers
-rw-r--r-- | sway/handlers.c | 3 | ||||
-rw-r--r-- | sway/layout.h | 4 | ||||
-rw-r--r-- | sway/workspace.c | 1 |
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 | |||
85 | bool pointer_test(swayc_t *view, void *_origin) { | 85 | bool pointer_test(swayc_t *view, void *_origin) { |
86 | const struct wlc_origin *origin = _origin; | 86 | const struct wlc_origin *origin = _origin; |
87 | if (view->type == C_VIEW && origin->x >= view->x && origin->y >= view->y | 87 | if (view->type == C_VIEW && origin->x >= view->x && origin->y >= view->y |
88 | && origin->x < view->x + view->width && origin->y < view->y + view->height) { | 88 | && origin->x < view->x + view->width && origin->y < view->y + view->height |
89 | && view->visible) { | ||
89 | return true; | 90 | return true; |
90 | } | 91 | } |
91 | return false; | 92 | 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 { | |||
29 | 29 | ||
30 | int x, y; | 30 | int x, y; |
31 | 31 | ||
32 | int weight; | 32 | bool visible; |
33 | |||
34 | int weight; | ||
33 | 35 | ||
34 | char *name; | 36 | char *name; |
35 | 37 | ||
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) { | |||
40 | 40 | ||
41 | if(view->type == C_VIEW) { | 41 | if(view->type == C_VIEW) { |
42 | wlc_view_set_mask(view->handle, *p); | 42 | wlc_view_set_mask(view->handle, *p); |
43 | view->visible = (*p == 2); | ||
43 | } | 44 | } |
44 | } | 45 | } |
45 | 46 | ||