app: apply WindowModes at startup

As reported on slack by Rajiv Kanchan, when a WindowMode
is used with app.NewWindow, it does not get applied.

Delay the Configure method to make sure it is.

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
Pierre Curto
2022-01-20 10:18:08 +01:00
committed by Elias Naur
parent 65199a2274
commit 8c2d9a9a57
+1 -1
View File
@@ -798,10 +798,10 @@ func newX11Window(gioWin *callbacks, options []Option) error {
go func() {
w.w.SetDriver(w)
w.Configure(options)
// make the window visible on the screen
C.XMapWindow(dpy, win)
w.Configure(options)
w.w.Event(ViewEvent{Display: unsafe.Pointer(dpy), Window: uintptr(win)})
w.setStage(system.StageRunning)
w.loop()