mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 06:10:07 -04:00
wayland: fix CSD decorations glitch when closing
In rare cases destroying subsurfaces before the main surface could result in a frame where the window is still shown, but decorations got hidden, right before the window itself disappears.
This commit is contained in:
@@ -253,3 +253,4 @@ changelog entry.
|
|||||||
- On Web, fix setting cursor icon overriding cursor visibility.
|
- On Web, fix setting cursor icon overriding cursor visibility.
|
||||||
- On Windows, fix cursor not confined to center of window when grabbed and hidden.
|
- On Windows, fix cursor not confined to center of window when grabbed and hidden.
|
||||||
- On macOS, fix sequence of mouse events being out of order when dragging on the trackpad.
|
- On macOS, fix sequence of mouse events being out of order when dragging on the trackpad.
|
||||||
|
- On Wayland, fix decoration glitch on close with some compositors
|
||||||
|
|||||||
@@ -57,9 +57,6 @@ pub struct WindowState {
|
|||||||
/// The connection to Wayland server.
|
/// The connection to Wayland server.
|
||||||
pub connection: Connection,
|
pub connection: Connection,
|
||||||
|
|
||||||
/// The window frame, which is created from the configure request.
|
|
||||||
frame: Option<WinitFrame>,
|
|
||||||
|
|
||||||
/// The `Shm` to set cursor.
|
/// The `Shm` to set cursor.
|
||||||
pub shm: WlShm,
|
pub shm: WlShm,
|
||||||
|
|
||||||
@@ -155,6 +152,13 @@ pub struct WindowState {
|
|||||||
|
|
||||||
/// The underlying SCTK window.
|
/// The underlying SCTK window.
|
||||||
pub window: Window,
|
pub window: Window,
|
||||||
|
|
||||||
|
// NOTE: The spec says that destroying parent(`window` in our case), will unmap the
|
||||||
|
// subsurfaces. Thus to achieve atomic unmap of the client, drop the decorations
|
||||||
|
// frame after the `window` is dropped. To achieve that we rely on rust's struct
|
||||||
|
// field drop order guarantees.
|
||||||
|
/// The window frame, which is created from the configure request.
|
||||||
|
frame: Option<WinitFrame>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WindowState {
|
impl WindowState {
|
||||||
|
|||||||
Reference in New Issue
Block a user