From 302e3830e96d9145021c50f32b831acca1318f0f Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 30 Oct 2026 21:29:44 -0700 Subject: [PATCH] refactor(windows): carry DebugWindow as i64 The unified SocketMessage has DebugWindow(i64) (D15): i64 accepts every value any tree accepts (Windows isize, KDE and macOS u32) and writes the same digits. The Windows handler and komorebi-gui convert with as (isize and i64 are the same width on the supported 64-bit targets), so Windows behaviour is unchanged. Verified: Windows clippy --workspace --locked --all-targets -D warnings clean. --- komorebi-gui/src/main.rs | 2 +- komorebi/src/core/mod.rs | 2 +- komorebi/src/process_command.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/komorebi-gui/src/main.rs b/komorebi-gui/src/main.rs index 8214331a..9af90da9 100644 --- a/komorebi-gui/src/main.rs +++ b/komorebi-gui/src/main.rs @@ -292,7 +292,7 @@ impl eframe::App for KomorebiGui { { let debug_rule: RuleDebug = serde_json::from_str( &komorebi_client::send_query( - &SocketMessage::DebugWindow(self.debug_hwnd), + &SocketMessage::DebugWindow(self.debug_hwnd as i64), ) .unwrap(), ) diff --git a/komorebi/src/core/mod.rs b/komorebi/src/core/mod.rs index 7a9a7542..e088e085 100644 --- a/komorebi/src/core/mod.rs +++ b/komorebi/src/core/mod.rs @@ -283,7 +283,7 @@ pub enum SocketMessage { SocketSchema, StaticConfigSchema, GenerateStaticConfig, - DebugWindow(isize), + DebugWindow(i64), // low level commands ApplyState(State), } diff --git a/komorebi/src/process_command.rs b/komorebi/src/process_command.rs index d11b276f..3d1430d1 100644 --- a/komorebi/src/process_command.rs +++ b/komorebi/src/process_command.rs @@ -2214,7 +2214,7 @@ if (!(Get-Process komorebi-bar -ErrorAction SilentlyContinue)) self.update_focused_workspace(false, false)?; } SocketMessage::DebugWindow(hwnd) => { - let window = Window::from(hwnd); + let window = Window::from(hwnd as isize); let mut rule_debug = RuleDebug::default(); let _ = window.should_manage(None, &mut rule_debug); let schema = serde_json::to_string_pretty(&rule_debug)?;