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:
Elias Naur
2019-09-01 14:33:33 +02:00
parent 5766a8d226
commit dc62058bce
+1 -1
View File
@@ -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) {
w := winMap[topLvl]
w.dead = true
w.w.event(DestroyEvent{})
}
//export gio_onToplevelConfigure
@@ -772,6 +771,7 @@ loop:
break
}
if w.dead {
w.w.event(DestroyEvent{})
break
}
// Clear poll events.