diff options
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 0aa35c26..39261e3d 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -609,6 +609,8 @@ static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geo | |||
609 | view->y = geometry->origin.y; | 609 | view->y = geometry->origin.y; |
610 | update_geometry(view); | 610 | update_geometry(view); |
611 | } | 611 | } |
612 | } else { | ||
613 | wlc_view_set_geometry(handle, 0, geometry); | ||
612 | } | 614 | } |
613 | } | 615 | } |
614 | 616 | ||
@@ -927,6 +929,26 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w | |||
927 | // Update view pointer is on | 929 | // Update view pointer is on |
928 | pointer_state.view = container_under_pointer(); | 930 | pointer_state.view = container_under_pointer(); |
929 | 931 | ||
932 | struct sway_mode *mode = config->current_mode; | ||
933 | // handle bindings | ||
934 | for (int i = 0; i < mode->bindings->length; ++i) { | ||
935 | struct sway_binding *binding = mode->bindings->items[i]; | ||
936 | if ((modifiers->mods ^ binding->modifiers) == 0) { | ||
937 | switch (state) { | ||
938 | case WLC_BUTTON_STATE_PRESSED: { | ||
939 | if (!binding->release && handle_bindsym(binding, button, 0)) { | ||
940 | return EVENT_HANDLED; | ||
941 | } | ||
942 | } | ||
943 | case WLC_BUTTON_STATE_RELEASED: | ||
944 | if (binding->release && handle_bindsym(binding, button, 0)) { | ||
945 | return EVENT_HANDLED; | ||
946 | } | ||
947 | break; | ||
948 | } | ||
949 | } | ||
950 | } | ||
951 | |||
930 | // Update pointer_state | 952 | // Update pointer_state |
931 | switch (button) { | 953 | switch (button) { |
932 | case M_LEFT_CLICK: | 954 | case M_LEFT_CLICK: |