From f1e38be09f00688b90751a45e9365cfd906f8d39 Mon Sep 17 00:00:00 2001 From: taiyu Date: Sat, 22 Aug 2015 21:16:46 -0700 Subject: no mode for fullscreen --- sway/handlers.c | 16 ++++++++-------- 1 file 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 break; } + // get focused window and check if to change focus on mouse click + swayc_t *focused = get_focused_container(&root_container); + + // dont change focus or mode if fullscreen + if (swayc_is_fullscreen(focused)) { + return SEND_CLICK; + } + // set pointer mode pointer_mode_set(button, (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 return SEND_CLICK; } - // get focused window and check if to change focus on mouse click - swayc_t *focused = get_focused_container(&root_container); - // Check whether to change focus swayc_t *pointer = pointer_state.view; if (pointer && focused != pointer) { @@ -442,11 +447,6 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w } } - // dont change focus if fullscreen - if (swayc_is_fullscreen(focused)) { - return SEND_CLICK; - } - // Finally send click return SEND_CLICK; } -- cgit v1.2.3-54-g00ecf