diff options
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 53eae439..78f8927d 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -419,11 +419,11 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct | |||
419 | } | 419 | } |
420 | } | 420 | } |
421 | } | 421 | } |
422 | } | 422 | } |
423 | } else if (pointer_state.tiling.resize && view) { | 423 | } else if (pointer_state.tiling.resize && view) { |
424 | if (view != pointer_state.tiling.init_view) { | 424 | if (view != pointer_state.tiling.init_view) { |
425 | // Quit out of the resize | 425 | // Quit out of the resize |
426 | pointer_state.tiling.init_view = NULL; | 426 | //pointer_state.tiling.init_view = NULL; |
427 | } | 427 | } |
428 | if (!view->is_floating && view == pointer_state.tiling.init_view) { | 428 | if (!view->is_floating && view == pointer_state.tiling.init_view) { |
429 | // Handle layout resizes -- Find the biggest parent container then apply resizes to that | 429 | // Handle layout resizes -- Find the biggest parent container then apply resizes to that |
@@ -431,7 +431,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct | |||
431 | swayc_t *parent = view; | 431 | swayc_t *parent = view; |
432 | double dx = mouse_origin.x - prev_pos.x; | 432 | double dx = mouse_origin.x - prev_pos.x; |
433 | double dy = mouse_origin.y - prev_pos.y; | 433 | double dy = mouse_origin.y - prev_pos.y; |
434 | if (pointer_state.lock.top) { | 434 | if (!pointer_state.lock.bottom) { |
435 | while (parent->type != C_WORKSPACE) { | 435 | while (parent->type != C_WORKSPACE) { |
436 | // TODO: Absolute value is a bad hack here to compensate for rounding. Find a better | 436 | // TODO: Absolute value is a bad hack here to compensate for rounding. Find a better |
437 | // way of doing this. | 437 | // way of doing this. |
@@ -453,7 +453,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct | |||
453 | } | 453 | } |
454 | } | 454 | } |
455 | } | 455 | } |
456 | } else { | 456 | } else if (!pointer_state.lock.top) { |
457 | while (parent->type != C_WORKSPACE) { | 457 | while (parent->type != C_WORKSPACE) { |
458 | if (fabs(parent->parent->y - view->y) <= 1) { | 458 | if (fabs(parent->parent->y - view->y) <= 1) { |
459 | parent = parent->parent; | 459 | parent = parent->parent; |
@@ -476,7 +476,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct | |||
476 | } | 476 | } |
477 | 477 | ||
478 | parent = view; | 478 | parent = view; |
479 | if (pointer_state.lock.left) { | 479 | if (!pointer_state.lock.right) { |
480 | while (parent->type != C_WORKSPACE) { | 480 | while (parent->type != C_WORKSPACE) { |
481 | if (fabs(parent->parent->x + parent->parent->width - (view->x + view->width)) <= 1) { | 481 | if (fabs(parent->parent->x + parent->parent->width - (view->x + view->width)) <= 1) { |
482 | parent = parent->parent; | 482 | parent = parent->parent; |
@@ -497,7 +497,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct | |||
497 | } | 497 | } |
498 | } | 498 | } |
499 | } | 499 | } |
500 | } else { | 500 | } else if (!pointer_state.lock.left) { |
501 | while (parent->type != C_WORKSPACE) { | 501 | while (parent->type != C_WORKSPACE) { |
502 | if (fabs(parent->parent->x - view->x) <= 1 && parent->parent) { | 502 | if (fabs(parent->parent->x - view->x) <= 1 && parent->parent) { |
503 | parent = parent->parent; | 503 | parent = parent->parent; |