Skip to content

Commit

Permalink
fix(wm): mouse resize on right and bottom edges
Browse files Browse the repository at this point in the history
Addresses a regression introduced somewhere along the way in changing
how borders and rects sizes are calculated. Need to come back and see if
the constant calculated with the mix of BORDER_WIDTH and BORDER_OFFSET
is still relevant anymore.

fix #942
  • Loading branch information
LGUG2Z committed Aug 6, 2024
1 parent 6d038b8 commit ff653e7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions komorebi/src/process_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,14 +586,19 @@ impl WindowManager {
ops.push(resize_op!(resize.top, >, OperationDirection::Up));
}

// TODO: Determine if this is still needed
let top_left_constant = BORDER_WIDTH.load(Ordering::SeqCst)
+ BORDER_OFFSET.load(Ordering::SeqCst);

if resize.right != 0 && resize.left == top_left_constant {
if resize.right != 0
&& (resize.left == top_left_constant || resize.left == 0)
{
ops.push(resize_op!(resize.right, <, OperationDirection::Right));
}

if resize.bottom != 0 && resize.top == top_left_constant {
if resize.bottom != 0
&& (resize.top == top_left_constant || resize.top == 0)
{
ops.push(resize_op!(resize.bottom, <, OperationDirection::Down));
}

Expand Down

0 comments on commit ff653e7

Please sign in to comment.