diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-26 20:12:04 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-26 20:12:04 +0400 |
| commit | 953d1064c280cacf5c4c6bf7bcf79eece4e4235a (patch) | |
| tree | 9f729fe75c1c6519e0fbab9449baf1b9c678f1d1 /src/handlers | |
| parent | 4a585a3293286742d96689e52b1a314cf8c3854e (diff) | |
| download | niri-953d1064c280cacf5c4c6bf7bcf79eece4e4235a.tar.gz niri-953d1064c280cacf5c4c6bf7bcf79eece4e4235a.tar.bz2 niri-953d1064c280cacf5c4c6bf7bcf79eece4e4235a.zip | |
Add layer shell exclusive zone support
Diffstat (limited to 'src/handlers')
| -rw-r--r-- | src/handlers/layer_shell.rs | 4 | ||||
| -rw-r--r-- | src/handlers/xdg_shell.rs | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/handlers/layer_shell.rs b/src/handlers/layer_shell.rs index 39be2345..c426d321 100644 --- a/src/handlers/layer_shell.rs +++ b/src/handlers/layer_shell.rs @@ -49,7 +49,7 @@ impl WlrLayerShellHandler for State { None }; if let Some(output) = output { - self.niri.queue_redraw(output); + self.niri.output_resized(output); } } } @@ -96,6 +96,6 @@ impl State { } drop(map); - self.niri.queue_redraw(output); + self.niri.output_resized(output); } } diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs index 75b03add..387e4bb3 100644 --- a/src/handlers/xdg_shell.rs +++ b/src/handlers/xdg_shell.rs @@ -1,4 +1,4 @@ -use smithay::desktop::{find_popup_root_surface, PopupKind, Window}; +use smithay::desktop::{find_popup_root_surface, layer_map_for_output, PopupKind, Window}; use smithay::output::Output; use smithay::reexports::wayland_protocols::xdg::decoration::zv1::server::zxdg_toplevel_decoration_v1; use smithay::reexports::wayland_protocols::xdg::shell::server::xdg_toplevel::{self, ResizeEdge}; @@ -14,7 +14,7 @@ use smithay::wayland::shell::xdg::{ }; use smithay::{delegate_xdg_decoration, delegate_xdg_shell}; -use crate::layout::{configure_new_window, output_size}; +use crate::layout::configure_new_window; use crate::niri::State; impl XdgShellHandler for State { @@ -28,7 +28,8 @@ impl XdgShellHandler for State { // Tell the surface the preferred size and bounds for its likely output. let output = self.niri.monitor_set.active_output().unwrap(); - configure_new_window(output_size(output), &window); + let working_area = layer_map_for_output(output).non_exclusive_zone(); + configure_new_window(working_area, &window); // At the moment of creation, xdg toplevels must have no buffer. let existing = self.niri.unmapped_windows.insert(wl_surface, window); |
