summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar taiyu <taiyu.len@gmail.com>2015-08-22 21:16:46 -0700
committerLibravatar taiyu <taiyu.len@gmail.com>2015-08-22 21:16:46 -0700
commitf1e38be09f00688b90751a45e9365cfd906f8d39 (patch)
treedb89ee32c13d1770ae872b8a2189c5f3ac122519
parentmouse tile resize mode done (diff)
downloadsway-f1e38be09f00688b90751a45e9365cfd906f8d39.tar.gz
sway-f1e38be09f00688b90751a45e9365cfd906f8d39.tar.zst
sway-f1e38be09f00688b90751a45e9365cfd906f8d39.zip
no mode for fullscreen
-rw-r--r--sway/handlers.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 896caa10..d26ce5f3 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -407,6 +407,14 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
407 break; 407 break;
408 } 408 }
409 409
410 // get focused window and check if to change focus on mouse click
411 swayc_t *focused = get_focused_container(&root_container);
412
413 // dont change focus or mode if fullscreen
414 if (swayc_is_fullscreen(focused)) {
415 return SEND_CLICK;
416 }
417
410 // set pointer mode 418 // set pointer mode
411 pointer_mode_set(button, 419 pointer_mode_set(button,
412 (modifiers->mods & config->floating_mod) == config->floating_mod); 420 (modifiers->mods & config->floating_mod) == config->floating_mod);
@@ -421,9 +429,6 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
421 return SEND_CLICK; 429 return SEND_CLICK;
422 } 430 }
423 431
424 // get focused window and check if to change focus on mouse click
425 swayc_t *focused = get_focused_container(&root_container);
426
427 // Check whether to change focus 432 // Check whether to change focus
428 swayc_t *pointer = pointer_state.view; 433 swayc_t *pointer = pointer_state.view;
429 if (pointer && focused != pointer) { 434 if (pointer && focused != pointer) {
@@ -442,11 +447,6 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
442 } 447 }
443 } 448 }
444 449
445 // dont change focus if fullscreen
446 if (swayc_is_fullscreen(focused)) {
447 return SEND_CLICK;
448 }
449
450 // Finally send click 450 // Finally send click
451 return SEND_CLICK; 451 return SEND_CLICK;
452} 452}