summaryrefslogtreecommitdiffstats
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index cd97ab43..4980f65c 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -322,7 +322,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
322 int i = 0; 322 int i = 0;
323 // Do checks to determine if proper keys are being held 323 // Do checks to determine if proper keys are being held
324 swayc_t *view = active_workspace->focused; 324 swayc_t *view = active_workspace->focused;
325 if (m1_held) { 325 if (m1_held && view) {
326 if (view->is_floating) { 326 if (view->is_floating) {
327 while (keys_pressed[i++]) { 327 while (keys_pressed[i++]) {
328 if (keys_pressed[i] == config->floating_mod) { 328 if (keys_pressed[i] == config->floating_mod) {
@@ -338,7 +338,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
338 } 338 }
339 } 339 }
340 } 340 }
341 } else if (m2_held) { 341 } else if (m2_held && view) {
342 if (view->is_floating) { 342 if (view->is_floating) {
343 while (keys_pressed[i++]) { 343 while (keys_pressed[i++]) {
344 if (keys_pressed[i] == config->floating_mod) { 344 if (keys_pressed[i] == config->floating_mod) {