diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-01 09:45:57 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-02 10:01:52 +0300 |
| commit | 9f205d465c46928b95702447194faeb342a57965 (patch) | |
| tree | 9a105ad683ae172af8ce67afbf358526e41f4574 | |
| parent | d6e736aaf01b234e62e330e41135f47fe076a6d4 (diff) | |
| download | niri-9f205d465c46928b95702447194faeb342a57965.tar.gz niri-9f205d465c46928b95702447194faeb342a57965.tar.bz2 niri-9f205d465c46928b95702447194faeb342a57965.zip | |
mapped: Omit popups from animation snapshot
It's used only for resizes, and those render popups on top.
| -rw-r--r-- | src/window/mapped.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/window/mapped.rs b/src/window/mapped.rs index 37465843..77a08ab1 100644 --- a/src/window/mapped.rs +++ b/src/window/mapped.rs @@ -95,7 +95,7 @@ pub struct Mapped { /// Serials of commits that should be animated. animate_serials: Vec<Serial>, - /// Snapshot right before an animated commit. + /// Snapshot right before an animated commit, without popups. animation_snapshot: Option<LayoutElementRenderSnapshot>, /// State for the logic to request a size once (for floating windows). @@ -290,6 +290,7 @@ impl Mapped { self.need_to_recompute_rules = true; } + /// Renders a snapshot of the window without popups. fn render_snapshot(&self, renderer: &mut GlesRenderer) -> LayoutElementRenderSnapshot { let _span = tracy_client::span!("Mapped::render_snapshot"); @@ -309,17 +310,6 @@ impl Mapped { let mut contents = vec![]; let surface = self.toplevel().wl_surface(); - for (popup, popup_offset) in PopupManager::popups_for_surface(surface) { - let offset = self.window.geometry().loc + popup_offset - popup.geometry().loc; - - render_snapshot_from_surface_tree( - renderer, - popup.wl_surface(), - buf_pos + offset.to_f64(), - &mut contents, - ); - } - render_snapshot_from_surface_tree(renderer, surface, buf_pos, &mut contents); RenderSnapshot { |
