Skip to content

Commit

Permalink
Merge branch 'LGUG2Z:master' into komorebi_widget
Browse files Browse the repository at this point in the history
  • Loading branch information
CtByte authored Nov 27, 2024
2 parents dbb3240 + 1ef0630 commit 7d0d3f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions komorebi/src/process_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ impl WindowManager {
}
WindowManagerEvent::MouseCapture(..)
| WindowManagerEvent::Cloak(..)
| WindowManagerEvent::LocationChange(..)
| WindowManagerEvent::TitleUpdate(..) => {}
};

Expand Down Expand Up @@ -714,6 +715,7 @@ impl WindowManager {
if !matches!(
event,
WindowManagerEvent::Show(WinEvent::ObjectNameChange, _)
| WindowManagerEvent::LocationChange(_, _)
) {
tracing::info!("processed: {}", event.window().to_string());
} else {
Expand Down
10 changes: 9 additions & 1 deletion komorebi/src/window_manager_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub enum WindowManagerEvent {
Unmanage(Window),
Raise(Window),
TitleUpdate(WinEvent, Window),
LocationChange(WinEvent, Window),
}

impl Display for WindowManagerEvent {
Expand Down Expand Up @@ -78,6 +79,9 @@ impl Display for WindowManagerEvent {
Self::TitleUpdate(winevent, window) => {
write!(f, "TitleUpdate (WinEvent: {winevent}, Window: {window})")
}
Self::LocationChange(winevent, window) => {
write!(f, "LocationChange (WinEvent: {winevent}, Window: {window})")
}
}
}
}
Expand All @@ -98,7 +102,8 @@ impl WindowManagerEvent {
| Self::Raise(window)
| Self::Manage(window)
| Self::Unmanage(window)
| Self::TitleUpdate(_, window) => window,
| Self::TitleUpdate(_, window)
| Self::LocationChange(_, window) => window,
}
}

Expand All @@ -122,6 +127,7 @@ impl WindowManagerEvent {
WindowManagerEvent::Unmanage(_) => "Unmanage",
WindowManagerEvent::Raise(_) => "Raise",
WindowManagerEvent::TitleUpdate(_, _) => "TitleUpdate",
WindowManagerEvent::LocationChange(_, _) => "LocationChange",
}
}

Expand All @@ -137,6 +143,7 @@ impl WindowManagerEvent {
| WindowManagerEvent::MoveResizeStart(event, _)
| WindowManagerEvent::MoveResizeEnd(event, _)
| WindowManagerEvent::MouseCapture(event, _)
| WindowManagerEvent::LocationChange(event, _)
| WindowManagerEvent::TitleUpdate(event, _) => Some(event.to_string()),
WindowManagerEvent::Manage(_)
| WindowManagerEvent::Unmanage(_)
Expand Down Expand Up @@ -202,6 +209,7 @@ impl WindowManagerEvent {
Option::from(Self::TitleUpdate(winevent, window))
}
}
WinEvent::ObjectLocationChange => Option::from(Self::LocationChange(winevent, window)),
_ => None,
}
}
Expand Down

0 comments on commit 7d0d3f4

Please sign in to comment.