diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-19 14:41:17 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-03-19 18:29:13 +0400 |
| commit | 3963f537a4182dbcd8e1e2f262ee105473facc56 (patch) | |
| tree | 942f802863d1f8f63bbe68b53ab2d091e3c7dda9 /src/protocols | |
| parent | f31e105043a9fae0fae3dcfe0feb7ea1193d5f77 (diff) | |
| download | niri-3963f537a4182dbcd8e1e2f262ee105473facc56.tar.gz niri-3963f537a4182dbcd8e1e2f262ee105473facc56.tar.bz2 niri-3963f537a4182dbcd8e1e2f262ee105473facc56.zip | |
Wrap mapped windows in a Mapped
Diffstat (limited to 'src/protocols')
| -rw-r--r-- | src/protocols/foreign_toplevel.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocols/foreign_toplevel.rs b/src/protocols/foreign_toplevel.rs index 67dff830..af2be711 100644 --- a/src/protocols/foreign_toplevel.rs +++ b/src/protocols/foreign_toplevel.rs @@ -95,8 +95,8 @@ pub fn refresh(state: &mut State) { // Save the focused window for last, this way when the focus changes, we will first deactivate // the previous window and only then activate the newly focused window. let mut focused = None; - state.niri.layout.with_windows(|window, output| { - let wl_surface = window.toplevel().expect("no x11 support").wl_surface(); + state.niri.layout.with_windows(|mapped, output| { + let wl_surface = mapped.toplevel().wl_surface(); with_states(wl_surface, |states| { let role = states @@ -107,7 +107,7 @@ pub fn refresh(state: &mut State) { .unwrap(); if state.niri.keyboard_focus.surface() == Some(wl_surface) { - focused = Some((window.clone(), output.cloned())); + focused = Some((mapped.window.clone(), output.cloned())); } else { refresh_toplevel(protocol_state, wl_surface, &role, output, false); } |
