diff options
Diffstat (limited to 'src/handlers')
| -rw-r--r-- | src/handlers/compositor.rs | 8 | ||||
| -rw-r--r-- | src/handlers/xdg_shell.rs | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/handlers/compositor.rs b/src/handlers/compositor.rs index a7761824..dd5bb761 100644 --- a/src/handlers/compositor.rs +++ b/src/handlers/compositor.rs @@ -291,6 +291,7 @@ impl CompositorHandler for State { self.niri .stop_casts_for_target(CastTarget::Window { id: id.get() }); + self.niri.window_mru_ui.remove_window(id); self.niri.layout.remove_window(&window, transaction.clone()); self.add_default_dmabuf_pre_commit_hook(surface); @@ -311,6 +312,7 @@ impl CompositorHandler for State { if let Some(output) = output { self.niri.queue_redraw(&output); + self.niri.queue_redraw_mru_output(); } return; } @@ -337,6 +339,7 @@ impl CompositorHandler for State { } // The toplevel remains mapped. + self.niri.window_mru_ui.update_window(&self.niri.layout, id); self.niri.layout.update_window(&window, serial); // Move the toplevel according to the attach offset. @@ -357,6 +360,7 @@ impl CompositorHandler for State { if let Some(output) = output { self.niri.queue_redraw(&output); + self.niri.queue_redraw_mru_output(); } return; } @@ -370,9 +374,13 @@ impl CompositorHandler for State { let window = mapped.window.clone(); let output = output.cloned(); window.on_commit(); + self.niri + .window_mru_ui + .update_window(&self.niri.layout, mapped.id()); self.niri.layout.update_window(&window, None); if let Some(output) = output { self.niri.queue_redraw(&output); + self.niri.queue_redraw_mru_output(); } return; } diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs index e5d91f16..20f348ba 100644 --- a/src/handlers/xdg_shell.rs +++ b/src/handlers/xdg_shell.rs @@ -864,9 +864,9 @@ impl XdgShellHandler for State { let window = mapped.window.clone(); let output = output.cloned(); - self.niri.stop_casts_for_target(CastTarget::Window { - id: mapped.id().get(), - }); + let id = mapped.id(); + self.niri + .stop_casts_for_target(CastTarget::Window { id: id.get() }); self.backend.with_primary_renderer(|renderer| { self.niri.layout.store_unmap_snapshot(renderer, &window); @@ -883,6 +883,7 @@ impl XdgShellHandler for State { let active_window = self.niri.layout.focus().map(|m| &m.window); let was_active = active_window == Some(&window); + self.niri.window_mru_ui.remove_window(id); self.niri.layout.remove_window(&window, transaction.clone()); self.add_default_dmabuf_pre_commit_hook(surface.wl_surface()); @@ -898,6 +899,7 @@ impl XdgShellHandler for State { if let Some(output) = output { self.niri.queue_redraw(&output); + self.niri.queue_redraw_mru_output(); } } |
