mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 09:38:32 +02:00
fix(wm): mouse resize on right and bottom edges
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
This commit is contained in:
@@ -586,14 +586,19 @@ impl WindowManager {
|
|||||||
ops.push(resize_op!(resize.top, >, OperationDirection::Up));
|
ops.push(resize_op!(resize.top, >, OperationDirection::Up));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Determine if this is still needed
|
||||||
let top_left_constant = BORDER_WIDTH.load(Ordering::SeqCst)
|
let top_left_constant = BORDER_WIDTH.load(Ordering::SeqCst)
|
||||||
+ BORDER_OFFSET.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));
|
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));
|
ops.push(resize_op!(resize.bottom, <, OperationDirection::Down));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user