diff options
author | taiyu <[email protected]> | 2015-08-21 10:45:18 -0700 |
---|---|---|
committer | taiyu <[email protected]> | 2015-08-21 10:45:18 -0700 |
commit | d2e1c660b19e8bb24e496b3dd52d4696456863f0 (patch) | |
tree | a1cc9658c3558dca9476449e44f300ce4ded3329 /sway/handlers.c | |
parent | dde8bfe72838b2a08a6367a3bc26fde528c6dafe (diff) |
swayc_is_fullscreen
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 3dda3e43..98809958 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -568,7 +568,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct if (config->focus_follows_mouse && prev_handle != handle) { // Dont change focus if fullscreen swayc_t *focused = get_focused_view(view); - if (!(focused->type == C_VIEW && wlc_view_get_state(focused->handle) & WLC_BIT_FULLSCREEN) + if (!swayc_is_fullscreen(focused) && !(pointer_state.l_held || pointer_state.r_held)) { set_focused_container(container_under_pointer()); } @@ -600,7 +600,7 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w uint32_t button, enum wlc_button_state state, const struct wlc_origin *origin) { swayc_t *focused = get_focused_container(&root_container); // dont change focus if fullscreen - if (focused->type == C_VIEW && wlc_view_get_state(focused->handle) & WLC_BIT_FULLSCREEN) { + if (swayc_is_fullscreen(focused)) { return false; } if (state == WLC_BUTTON_STATE_PRESSED) { |