Closing a window during the Open event now works like in Qt. Do not post window resize events, because the window can be destroyed in the meantime.

[GB.GTK]
* BUG: Do not post window resize events, because the window can be destroyed in the meantime.
* BUG: Closing a window during the Open event now works like in Qt.

[GB.GTK3]
* BUG: Do not post window resize events, because the window can be destroyed in the meantime.
* BUG: Closing a window during the Open event now works like in Qt.
This commit is contained in:
gambas 2021-02-02 00:33:40 +01:00
parent 856a15a7a9
commit 3bbb6154c4

View file

@ -233,7 +233,7 @@ static void cb_resize(GtkWidget *wid, GdkRectangle *a, gMainWindow *data)
data->_resized = false; data->_resized = false;
data->bufW = w; data->bufW = w;
data->bufH = h; data->bufH = h;
data->emitResizeLater(); data->emitResize(); // later
} }
} }
@ -258,7 +258,7 @@ static void cb_resize_layout(GtkWidget *wid, GdkRectangle *a, gMainWindow *data)
data->_resized = false; data->_resized = false;
data->bufW = w; data->bufW = w;
data->bufH = h; data->bufH = h;
data->emitResizeLater(); data->emitResize(); // later
} }
} }
@ -1085,6 +1085,8 @@ void gMainWindow::showActivate()
if (!_moved) if (!_moved)
center(); center();
emitOpen(); emitOpen();
if (!_opened)
return;
show(); show();
if (v) if (v)
present(); present();