mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
ui/app: (wayland) ensure DestroyEvent is the last event
A ToplevelClose event could end in the same batch of events as another event, which will result in the other event being sent after a DestroyEvent. Window assumes no event will arrive after DestroyEvent, so ensure that property for the Wayland backend. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -310,7 +310,6 @@ func gio_onXdgSurfaceConfigure(data unsafe.Pointer, wmSurf *C.struct_xdg_surface
|
|||||||
func gio_onToplevelClose(data unsafe.Pointer, topLvl *C.struct_xdg_toplevel) {
|
func gio_onToplevelClose(data unsafe.Pointer, topLvl *C.struct_xdg_toplevel) {
|
||||||
w := winMap[topLvl]
|
w := winMap[topLvl]
|
||||||
w.dead = true
|
w.dead = true
|
||||||
w.w.event(DestroyEvent{})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//export gio_onToplevelConfigure
|
//export gio_onToplevelConfigure
|
||||||
@@ -772,6 +771,7 @@ loop:
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
if w.dead {
|
if w.dead {
|
||||||
|
w.w.event(DestroyEvent{})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
// Clear poll events.
|
// Clear poll events.
|
||||||
|
|||||||
Reference in New Issue
Block a user