aboutsummaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
authortaiyu <taiyu.len@gmail.com>2015-08-28 23:01:48 -0700
committertaiyu <taiyu.len@gmail.com>2015-08-28 23:01:48 -0700
commit9acd3d20681de1bbce791bdf82e5fb5e74dfb80f (patch)
treea0fbdeef58cf1c5ee9d680f5ea770ff4c14a51f2 /sway/handlers.c
parent19243991667d0a216b1014e8fe16503af6c11016 (diff)
#149 fix, reorder floating windows on click.
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 75f6a785..fa5c6c93 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -459,8 +459,11 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
// Check whether to change focus
swayc_t *pointer = pointer_state.view;
- if (pointer && focused != pointer) {
- set_focused_container(pointer_state.view);
+ sway_log(L_DEBUG, "pointer:%p",pointer);
+ if (pointer) {
+ if (focused != pointer) {
+ set_focused_container(pointer_state.view);
+ }
// Send to front if floating
if (pointer->is_floating) {
int i;
@@ -471,7 +474,7 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
break;
}
}
- wlc_view_bring_to_front(view);
+ wlc_view_bring_to_front(pointer->handle);
}
}