diff options
| author | Christian Meissl <meissl.christian@gmail.com> | 2024-02-24 18:31:54 +0100 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-28 13:19:41 +0400 |
| commit | 5ac350d51c0f16be3e40355bcb25cf23d34cc662 (patch) | |
| tree | a8e811d97b60b614216fbc4942c0562fe803bf78 /src/handlers | |
| parent | 494e98c1235133fd5267bfdfb9a5468f1115deff (diff) | |
| download | niri-5ac350d51c0f16be3e40355bcb25cf23d34cc662.tar.gz niri-5ac350d51c0f16be3e40355bcb25cf23d34cc662.tar.bz2 niri-5ac350d51c0f16be3e40355bcb25cf23d34cc662.zip | |
chore: update smithay
Diffstat (limited to 'src/handlers')
| -rw-r--r-- | src/handlers/compositor.rs | 3 | ||||
| -rw-r--r-- | src/handlers/mod.rs | 4 | ||||
| -rw-r--r-- | src/handlers/xdg_shell.rs | 10 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/handlers/compositor.rs b/src/handlers/compositor.rs index 2f842176..1c3b97c6 100644 --- a/src/handlers/compositor.rs +++ b/src/handlers/compositor.rs @@ -129,6 +129,7 @@ impl CompositorHandler for State { let parent = window .toplevel() + .expect("no x11 support") .parent() .and_then(|parent| self.niri.layout.find_window_and_output(&parent)) // Only consider the parent if we configured the window for the same @@ -168,7 +169,7 @@ impl CompositorHandler for State { // The toplevel remains unmapped. let unmapped = entry.get(); if unmapped.needs_initial_configure() { - let toplevel = unmapped.window.toplevel().clone(); + let toplevel = unmapped.window.toplevel().expect("no x11 support").clone(); self.queue_initial_configure(toplevel); } return; diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index ec1a20a8..8e92ea6e 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -64,6 +64,7 @@ use crate::utils::output_size; impl SeatHandler for State { type KeyboardFocus = WlSurface; type PointerFocus = WlSurface; + type TouchFocus = WlSurface; fn seat_state(&mut self) -> &mut SeatState<State> { &mut self.niri.seat_state @@ -339,7 +340,7 @@ impl ForeignToplevelHandler for State { fn close(&mut self, wl_surface: WlSurface) { if let Some((window, _)) = self.niri.layout.find_window_and_output(&wl_surface) { - window.toplevel().send_close(); + window.toplevel().expect("no x11 support").send_close(); } } @@ -348,6 +349,7 @@ impl ForeignToplevelHandler for State { { if !window .toplevel() + .expect("no x11 support") .current_state() .capabilities .contains(xdg_toplevel::WmCapabilities::Fullscreen) diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs index 590dc7a1..cf23d264 100644 --- a/src/handlers/xdg_shell.rs +++ b/src/handlers/xdg_shell.rs @@ -112,7 +112,7 @@ impl XdgShellHandler for State { fn new_toplevel(&mut self, surface: ToplevelSurface) { let wl_surface = surface.wl_surface().clone(); - let unmapped = Unmapped::new(Window::new(surface)); + let unmapped = Unmapped::new(Window::new_wayland_window(surface)); let existing = self.niri.unmapped_windows.insert(wl_surface, unmapped); assert!(existing.is_none()); } @@ -210,7 +210,9 @@ impl XdgShellHandler for State { } let layout_focus = self.niri.layout.focus(); - if Some(&root) != layout_focus.map(|win| win.toplevel().wl_surface()) { + if Some(&root) + != layout_focus.map(|win| win.toplevel().expect("no x11 support").wl_surface()) + { let _ = PopupManager::dismiss_popup(&root, &popup); return; } @@ -771,7 +773,9 @@ impl State { pub fn update_reactive_popups(&self, window: &Window, output: &Output) { let _span = tracy_client::span!("Niri::update_reactive_popups"); - for (popup, _) in PopupManager::popups_for_surface(window.toplevel().wl_surface()) { + for (popup, _) in PopupManager::popups_for_surface( + window.toplevel().expect("no x11 support").wl_surface(), + ) { match popup { PopupKind::Xdg(ref popup) => { if popup.with_pending_state(|state| state.positioner.reactive) { |
