mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-05-31 07:50:41 +02:00
fix(wm): restore drag-to-swap window functionality
This commit fixes a regression that was most likely introduced in #678 which changed a bunch of stuff related to window and border dimension calculation. While we could previously assume that the points resize.right and resize.bottom would always be 0 if we were dealing with a move rather than a resize, these two points now depend on the values of BORDER_WIDTH and BORDER_OFFSET. The code has been updated to reflect this and calculate this constant just-in-time.
This commit is contained in:
+3
-2
@@ -192,7 +192,6 @@ lazy_static! {
|
||||
static ref BORDER_RECT: Arc<Mutex<Rect>> =
|
||||
Arc::new(Mutex::new(Rect::default()));
|
||||
|
||||
static ref BORDER_OFFSET: AtomicI32 = Default::default();
|
||||
|
||||
// Use app-specific titlebar removal options where possible
|
||||
// eg. Windows Terminal, IntelliJ IDEA, Firefox
|
||||
@@ -212,7 +211,9 @@ pub static BORDER_COLOUR_SINGLE: AtomicU32 = AtomicU32::new(0);
|
||||
pub static BORDER_COLOUR_STACK: AtomicU32 = AtomicU32::new(0);
|
||||
pub static BORDER_COLOUR_MONOCLE: AtomicU32 = AtomicU32::new(0);
|
||||
pub static BORDER_COLOUR_CURRENT: AtomicU32 = AtomicU32::new(0);
|
||||
pub static BORDER_WIDTH: AtomicI32 = AtomicI32::new(20);
|
||||
pub static BORDER_WIDTH: AtomicI32 = AtomicI32::new(8);
|
||||
pub static BORDER_OFFSET: AtomicI32 = AtomicI32::new(-1);
|
||||
|
||||
// 0 0 0 aka pure black, I doubt anyone will want this as a border colour
|
||||
pub const TRANSPARENCY_COLOUR: u32 = 0;
|
||||
pub static REMOVE_TITLEBARS: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
Reference in New Issue
Block a user