aboutsummaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 5e8e05b8..71691d7d 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -15,7 +15,6 @@
#include "focus.h"
uint32_t keys_pressed[32];
-uint32_t key_modifiers;
int keys_pressed_length = 0;
@@ -27,10 +26,6 @@ static bool m2_held = false;
static bool resizing = false;
static bool lock_left, lock_right, lock_top, lock_bottom = false;
-static bool floating_mod_pressed(void) {
- return key_modifiers & config->floating_mod;
-}
-
static bool pointer_test(swayc_t *view, void *_origin) {
const struct wlc_origin *origin = _origin;
// Determine the output that the view is under
@@ -295,7 +290,6 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
return false;
}
bool cmd_success = false;
- key_modifiers = modifiers->mods;
struct sway_mode *mode = config->current_mode;
// Lowercase if necessary
@@ -497,7 +491,7 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
}
}
arrange_windows(pointer->parent, -1, -1);
- if (floating_mod_pressed()) {
+ if (modifiers->mods & config->floating_mod) {
dragging = m1_held;
resizing = m2_held;
int midway_x = pointer->x + pointer->width/2;
@@ -516,7 +510,6 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
if (button == 272) {
m1_held = false;
dragging = false;
- lock_top = lock_bottom = lock_left = lock_right = false;
}
if (button == 273) {
m2_held = false;