diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-09 18:34:51 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-08-09 18:34:51 -0400 |
commit | 03af90d302e6a619db6a1f0c479995a81f301e13 (patch) | |
tree | 1ea5fc8b6cf1ba363076d21f580448a201a5999f /sway | |
parent | Merge pull request #1313 from ilyaluk/nonblock-ipc-server (diff) | |
download | sway-03af90d302e6a619db6a1f0c479995a81f301e13.tar.gz sway-03af90d302e6a619db6a1f0c479995a81f301e13.tar.zst sway-03af90d302e6a619db6a1f0c479995a81f301e13.zip |
Clean up fallthrough issues
Diffstat (limited to 'sway')
-rw-r--r-- | sway/handlers.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index fd174ac9..70633a1b 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -452,6 +452,7 @@ static bool handle_view_created(wlc_handle handle) { | |||
452 | wlc_view_focus(handle); | 452 | wlc_view_focus(handle); |
453 | wlc_view_bring_to_front(handle); | 453 | wlc_view_bring_to_front(handle); |
454 | newview = new_floating_view(handle); | 454 | newview = new_floating_view(handle); |
455 | /* fallthrough */ | ||
455 | case WLC_BIT_POPUP: | 456 | case WLC_BIT_POPUP: |
456 | wlc_view_bring_to_front(handle); | 457 | wlc_view_bring_to_front(handle); |
457 | break; | 458 | break; |
@@ -934,15 +935,15 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w | |||
934 | struct sway_binding *binding = mode->bindings->items[i]; | 935 | struct sway_binding *binding = mode->bindings->items[i]; |
935 | if ((modifiers->mods ^ binding->modifiers) == 0) { | 936 | if ((modifiers->mods ^ binding->modifiers) == 0) { |
936 | switch (state) { | 937 | switch (state) { |
937 | case WLC_BUTTON_STATE_PRESSED: { | 938 | case WLC_BUTTON_STATE_PRESSED: |
938 | if (!binding->release && handle_bindsym(binding, button, 0)) { | 939 | if (!binding->release && handle_bindsym(binding, button, 0)) { |
939 | return EVENT_HANDLED; | 940 | return EVENT_HANDLED; |
940 | } | 941 | } |
942 | break; | ||
943 | case WLC_BUTTON_STATE_RELEASED: | ||
944 | if (binding->release && handle_bindsym(binding, button, 0)) { | ||
945 | return EVENT_HANDLED; | ||
941 | } | 946 | } |
942 | case WLC_BUTTON_STATE_RELEASED: | ||
943 | if (binding->release && handle_bindsym(binding, button, 0)) { | ||
944 | return EVENT_HANDLED; | ||
945 | } | ||
946 | break; | 947 | break; |
947 | } | 948 | } |
948 | } | 949 | } |