call map.arrange as often as possible, ensuring shell surfaces are always at the correct size

This commit is contained in:
IoIxD 2026-07-10 14:09:36 -07:00
commit 4f1a13f11f
3 changed files with 10 additions and 7 deletions

@ -1 +1 @@
Subproject commit cb1eb2a3f48d95a7ea4b030159a2512ba667a2fb
Subproject commit 3021f619e2ae4dab8bfb1e21f3f210923b9b6582

View file

@ -8,9 +8,10 @@ use smithay::{
wayland::{
buffer::BufferHandler,
compositor::{
get_parent, is_sync_subsurface, CompositorClientState, CompositorHandler,
get_parent, is_sync_subsurface, with_states, CompositorClientState, CompositorHandler,
CompositorState,
},
shell::xdg::XdgToplevelSurfaceData,
shm::{ShmHandler, ShmState},
},
xwayland::XWaylandClientData,
@ -43,10 +44,11 @@ impl CompositorHandler for State {
.find(|w| w.window.toplevel().unwrap().wl_surface() == &root)
{
window.window.on_commit();
window.window.toplevel().unwrap().send_pending_configure();
}
};
// xdg_shell::handle_commit(&mut self.popups, &self.space, surface);
// resize_grab::handle_commit(&mut self.space, surface);
}
}

View file

@ -422,9 +422,6 @@ impl State {
damage_tracker: &mut OutputDamageTracker,
) -> Result<(), Box<dyn std::error::Error>> {
self.space.elements().for_each(|window| {
if let Some(toplevel) = window.window.toplevel() {
toplevel.send_pending_configure();
}
window.window.send_frame(
&output,
self.start_time.elapsed(),
@ -432,8 +429,12 @@ impl State {
|_, _| Some(output.clone()),
)
});
self.space.outputs().for_each(|output| {
layer_map_for_output(output).layers().for_each(|layer| {
let mut map = layer_map_for_output(output);
map.arrange();
map.layers().for_each(|layer| {
layer.layer_surface().send_pending_configure();
layer.send_frame(
&output,