app: [Windows] avoid deadlock when changing window configuration

Some window configurations lead to WM_SIZE messages when changed, which
leads to deadlock because our window proc is not re-entrant. Avoid the
issues by ignoring redundant messages.

Fixes gio#262

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-09-03 12:11:55 +02:00
parent a5625031a4
commit d03f618660
+4 -2
View File
@@ -444,8 +444,10 @@ func (w *window) Wakeup() {
}
func (w *window) setStage(s system.Stage) {
w.stage = s
w.w.Event(system.StageEvent{Stage: s})
if s != w.stage {
w.stage = s
w.w.Event(system.StageEvent{Stage: s})
}
}
func (w *window) draw(sync bool) {