Keep track of RenderElementStates in offscreens

This both avoids sending frame callbacks to surfaces invisible on the offscreen
(fixing Firefox with subsurface compositing in the process), and fixes
searching for split popups during the resize animation.
This commit is contained in:
Ivan Molodetskikh
2025-03-01 09:45:57 +03:00
parent 12817a682d
commit b351f6ff22
8 changed files with 114 additions and 48 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ use niri::layout::{
ConfigureIntent, InteractiveResizeData, LayoutElement, LayoutElementRenderElement,
LayoutElementRenderSnapshot,
};
use niri::render_helpers::offscreen::OffscreenData;
use niri::render_helpers::renderer::NiriRenderer;
use niri::render_helpers::solid_color::{SolidColorBuffer, SolidColorRenderElement};
use niri::render_helpers::{RenderTarget, SplitElements};
@@ -214,7 +215,7 @@ impl LayoutElement for TestWindow {
fn output_leave(&self, _output: &Output) {}
fn set_offscreen_element_id(&self, _id: Option<Id>) {}
fn set_offscreen_data(&self, _data: Option<OffscreenData>) {}
fn set_activated(&mut self, _active: bool) {}