diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/handlers.c | 2 | ||||
-rw-r--r-- | sway/layout.c | 2 | ||||
-rw-r--r-- | sway/workspace.c | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 0e68a3c8..9ee4f3cb 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -238,8 +238,8 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier | |||
238 | } | 238 | } |
239 | 239 | ||
240 | static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) { | 240 | static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) { |
241 | static wlc_handle prev_view = 0; | ||
241 | mouse_origin = *origin; | 242 | mouse_origin = *origin; |
242 | static wlc_handle prev_view = -1; | ||
243 | if (config->focus_follows_mouse && prev_view != view) { | 243 | if (config->focus_follows_mouse && prev_view != view) { |
244 | focus_pointer(); | 244 | focus_pointer(); |
245 | } | 245 | } |
diff --git a/sway/layout.c b/sway/layout.c index a6d6fcbb..963bd8dc 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -237,7 +237,7 @@ void unfocus_all(swayc_t *container) { | |||
237 | } | 237 | } |
238 | 238 | ||
239 | void focus_view(swayc_t *view) { | 239 | void focus_view(swayc_t *view) { |
240 | sway_log(L_DEBUG, "Setting focus for %p", view); | 240 | sway_log(L_DEBUG, "Setting focus for %p:%ld", view, view->handle); |
241 | swayc_t *c = view; | 241 | swayc_t *c = view; |
242 | //Set focus from root to view | 242 | //Set focus from root to view |
243 | while (c != &root_container) { | 243 | while (c != &root_container) { |
diff --git a/sway/workspace.c b/sway/workspace.c index a3238da6..15828658 100644 --- a/sway/workspace.c +++ b/sway/workspace.c | |||
@@ -82,10 +82,14 @@ bool workspace_by_name(swayc_t *view, void *data) { | |||
82 | 82 | ||
83 | void set_mask(swayc_t *view, void *data) { | 83 | void set_mask(swayc_t *view, void *data) { |
84 | uint32_t *p = data; | 84 | uint32_t *p = data; |
85 | |||
86 | if (view->type == C_VIEW) { | 85 | if (view->type == C_VIEW) { |
87 | wlc_view_set_mask(view->handle, *p); | 86 | wlc_view_set_mask(view->handle, *p); |
88 | } | 87 | } |
88 | if (*p == 2) { | ||
89 | wlc_view_bring_to_front(view->handle); | ||
90 | } else { | ||
91 | wlc_view_send_to_back(view->handle); | ||
92 | } | ||
89 | view->visible = (*p == 2); | 93 | view->visible = (*p == 2); |
90 | } | 94 | } |
91 | 95 | ||