1
1
mirror of https://github.com/swaywm/sway synced 2024-11-18 23:14:03 +01:00

no mode for fullscreen

This commit is contained in:
taiyu 2015-08-22 21:16:46 -07:00
parent 42d5d9a177
commit f1e38be09f

@ -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;
}