From b769f166d395c660f1a62d0635d00292a2431702 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 30 Oct 2026 21:28:58 -0700 Subject: [PATCH] refactor(protocol): use FocusFollowsMouseImplementation from komorebi-protocol in KDE Delete KDE's copy (same text after the converge revision) and re-export the crate's. Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors, no warnings; komorebic static-config-schema is byte-identical to the checked-in schema.json (the KWin sentence now comes from cfg_attr in the crate). --- komorebi-for-kde/komorebi/src/core/mod.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/komorebi-for-kde/komorebi/src/core/mod.rs b/komorebi-for-kde/komorebi/src/core/mod.rs index 2b11cb71..8d7bc2f2 100644 --- a/komorebi-for-kde/komorebi/src/core/mod.rs +++ b/komorebi-for-kde/komorebi/src/core/mod.rs @@ -55,6 +55,7 @@ pub mod asc; pub mod config_generation; pub use komorebi_protocol::pathext; pub use komorebi_protocol::types::ApplicationIdentifier; +pub use komorebi_protocol::types::FocusFollowsMouseImplementation; pub use komorebi_protocol::types::MonocleFocusBehaviour; pub use komorebi_protocol::types::MoveBehaviour; pub use komorebi_protocol::types::OperationBehaviour; @@ -166,23 +167,6 @@ impl Placement { } } -#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize, Display, EnumString, ValueEnum)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -/// Focus follows mouse implementation -// KDE's compositor does the focusing: its description says so (it is part of the checked-in schema) -#[cfg_attr(target_os = "linux", doc = "")] -#[cfg_attr( - target_os = "linux", - doc = " The two exist on Windows. On KDE the compositor does it, so both ask KWin for its" -)] -#[cfg_attr(target_os = "linux", doc = " \"focus follows mouse\" focus policy.")] -pub enum FocusFollowsMouseImplementation { - /// Custom FFM implementation (slightly more CPU-intensive) - Komorebi, - /// Native (legacy) Windows FFM implementation - Windows, -} - #[derive( Clone, Copy,