GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
feat: remove `NativeFocusSynced` event
Lars Berger3ddb1bbd4c12
diff --git a/packages/wm/src/common/commands/sync_native_focus.rs b/packages/wm/src/common/commands/sync_native_focus.rsindex 54cebbf6..646cc8c5 100644--- a/packages/wm/src/common/commands/sync_native_focus.rs+++ b/packages/wm/src/common/commands/sync_native_focus.rs@@ -26,9 +26,8 @@ pub fn sync_native_focus(state: &mut WmState) -> anyhow::Result<()> {let _ = native_window.set_foreground();}- state.emit_event(WmEvent::NativeFocusSynced {- focused_container: focused_container.clone(),- });+ // TODO: Change z-index of workspace windows that match the focused+ // container's state.state.emit_event(WmEvent::FocusChanged {focused_container: focused_container,diff --git a/packages/wm/src/common/events/handle_window_focused.rs b/packages/wm/src/common/events/handle_window_focused.rsindex cc13d95f..d6e0a9c6 100644--- a/packages/wm/src/common/events/handle_window_focused.rs+++ b/packages/wm/src/common/events/handle_window_focused.rs@@ -2,7 +2,7 @@ use tracing::info;use crate::{common::{platform::NativeWindow, DisplayState},- containers::{commands::set_focused_descendant, Container},+ containers::commands::set_focused_descendant,user_config::UserConfig,windows::traits::WindowGetters,wm_event::WmEvent,@@ -60,7 +60,7 @@ pub fn handle_window_focused(set_focused_descendant(window.clone().into(), None);state.emit_event(WmEvent::FocusChanged {- focused_container: Into::<Container>::into(window).clone(),+ focused_container: window.clone().into(),})}diff --git a/packages/wm/src/wm_event.rs b/packages/wm/src/wm_event.rsindex 6502137b..fc7274bc 100644--- a/packages/wm/src/wm_event.rs+++ b/packages/wm/src/wm_event.rs@@ -29,9 +29,6 @@ pub enum WmEvent {removed_id: Uuid,removed_device_name: String,},- NativeFocusSynced {- focused_container: Container,- },TilingDirectionChanged {modified_id: Uuid,new_tiling_direction: TilingDirection,