Skip to content

Commit

Permalink
fix(wm): ensure stackbar tab clicks trigger
Browse files Browse the repository at this point in the history
This commit fixes a small regression that prevented events emitted from
clicks on stackbar tabs from being handled.
  • Loading branch information
LGUG2Z committed Apr 13, 2024
1 parent d8d087e commit 5334e19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 8 additions & 1 deletion komorebi/src/process_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,14 @@ impl WindowManager {

// All event handlers below this point should only be processed if the event is
// related to a window that should be managed by the WindowManager.
if !should_manage {
if !should_manage
&& !matches!(
event,
WindowManagerEvent::DisplayChange(_)
| WindowManagerEvent::ForceUpdate(_)
| WindowManagerEvent::FocusChange(_, _)
)
{
return Ok(());
}

Expand Down
4 changes: 0 additions & 4 deletions komorebi/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,6 @@ impl Window {

#[tracing::instrument(fields(exe, title))]
pub fn should_manage(self, event: Option<WindowManagerEvent>) -> Result<bool> {
if let Some(WindowManagerEvent::DisplayChange(_)) = event {
return Ok(true);
}

#[allow(clippy::question_mark)]
if self.title().is_err() {
return Ok(false);
Expand Down

0 comments on commit 5334e19

Please sign in to comment.