mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-23 02:16:33 +11:00
On Wayland commit after setting all startup props
The commit without buffer attached should be done after setting all
top level size/application related properties. While c4df7ad7a
added
commit after setting decorations, it accounted just for decorations,
however we should account for the min/max size and other attributes.
This commit is contained in:
parent
485e82dcb1
commit
c57294b41a
1 changed files with 10 additions and 6 deletions
|
@ -145,12 +145,6 @@ impl Window {
|
||||||
} else {
|
} else {
|
||||||
window.set_decorate(Decorations::None);
|
window.set_decorate(Decorations::None);
|
||||||
}
|
}
|
||||||
// Without this commit here at least on kwin 5.23.3 the initial configure
|
|
||||||
// will have a size (1,1), the second configure including the decoration
|
|
||||||
// mode will have the min_size as its size. With this commit the initial
|
|
||||||
// configure will have no size, the application will draw it's content
|
|
||||||
// with the initial size and everything works as expected afterwards.
|
|
||||||
window.surface().commit();
|
|
||||||
|
|
||||||
// Min dimensions.
|
// Min dimensions.
|
||||||
let min_size = attributes
|
let min_size = attributes
|
||||||
|
@ -198,6 +192,16 @@ impl Window {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Without this commit here at least on kwin 5.23.3 the initial configure
|
||||||
|
// will have a size (1,1), the second configure including the decoration
|
||||||
|
// mode will have the min_size as its size. With this commit the initial
|
||||||
|
// configure will have no size, the application will draw it's content
|
||||||
|
// with the initial size and everything works as expected afterwards.
|
||||||
|
//
|
||||||
|
// The window commit must be after setting on top level properties, but right before any
|
||||||
|
// buffer attachments commits.
|
||||||
|
window.surface().commit();
|
||||||
|
|
||||||
let size = Arc::new(Mutex::new(LogicalSize::new(width, height)));
|
let size = Arc::new(Mutex::new(LogicalSize::new(width, height)));
|
||||||
|
|
||||||
// We should trigger redraw and commit the surface for the newly created window.
|
// We should trigger redraw and commit the surface for the newly created window.
|
||||||
|
|
Loading…
Add table
Reference in a new issue