1
0
Fork 0
forked from wry/wry

xdg-shell: fetch existing extents when surface is created

The surface might alredy have non-0 extents due to the use of
wp_viewporter.
This commit is contained in:
Julian Orth 2025-07-17 15:57:01 +02:00
parent 75da2ed107
commit e6cdbdcac4
2 changed files with 2 additions and 1 deletions

View file

@ -203,7 +203,7 @@ impl XdgSurface {
requested_serial: NumCell::new(1),
acked_serial: Cell::new(None),
geometry: Cell::new(None),
extents: Cell::new(Default::default()),
extents: Cell::new(surface.extents.get()),
absolute_desired_extents: Cell::new(Default::default()),
ext: Default::default(),
popup_display_stack: CloneCell::new(surface.client.state.root.stacked.clone()),

View file

@ -157,6 +157,7 @@ impl XdgToplevel {
toplevel_data
.content_type
.set(surface.surface.content_type.get());
toplevel_data.pos.set(surface.extents.get());
Self {
id,
state: state.clone(),