forge
Explore
Log in

Don't you dare go Hollow

mapped: Omit popups from animation snapshot

Browse files at this commit

9f205d465c46928b95702447194faeb342a57965Ivan MolodetskikhParent: d6e736a
It's used only for resizes, and those render popups on top.
src/window/mapped.rsmodified+2 -12
@@ -95,7 +95,7 @@ pub struct Mapped {
95 /// Serials of commits that should be animated.95 /// Serials of commits that should be animated.
96 animate_serials: Vec<Serial>,96 animate_serials: Vec<Serial>,
97 97
98- /// Snapshot right before an animated commit.98+ /// Snapshot right before an animated commit, without popups.
99 animation_snapshot: Option<LayoutElementRenderSnapshot>,99 animation_snapshot: Option<LayoutElementRenderSnapshot>,
100 100
101 /// State for the logic to request a size once (for floating windows).101 /// State for the logic to request a size once (for floating windows).
@@ -290,6 +290,7 @@ impl Mapped {
290 self.need_to_recompute_rules = true;290 self.need_to_recompute_rules = true;
291 }291 }
292 292
293+ /// Renders a snapshot of the window without popups.
293 fn render_snapshot(&self, renderer: &mut GlesRenderer) -> LayoutElementRenderSnapshot {294 fn render_snapshot(&self, renderer: &mut GlesRenderer) -> LayoutElementRenderSnapshot {
294 let _span = tracy_client::span!("Mapped::render_snapshot");295 let _span = tracy_client::span!("Mapped::render_snapshot");
295 296
@@ -309,17 +310,6 @@ impl Mapped {
309 let mut contents = vec![];310 let mut contents = vec![];
310 311
311 let surface = self.toplevel().wl_surface();312 let surface = self.toplevel().wl_surface();
312- for (popup, popup_offset) in PopupManager::popups_for_surface(surface) {
313- let offset = self.window.geometry().loc + popup_offset - popup.geometry().loc;
314-
315- render_snapshot_from_surface_tree(
316- renderer,
317- popup.wl_surface(),
318- buf_pos + offset.to_f64(),
319- &mut contents,
320- );
321- }
322-
323 render_snapshot_from_surface_tree(renderer, surface, buf_pos, &mut contents);313 render_snapshot_from_surface_tree(renderer, surface, buf_pos, &mut contents);
324 314
325 RenderSnapshot {315 RenderSnapshot {