Fix window geometry shenanigans

This commit is contained in:
Vojtech Kral 2019-02-08 12:05:12 +01:00
parent 8da7ef41c0
commit 5a2a39c3ab
2 changed files with 16 additions and 26 deletions

View file

@ -352,22 +352,6 @@ void GUI_App::persist_window_geometry(wxTopLevelWindow *window)
window_pos_restore(window, name);
// #ifdef _WIN32
// // On windows, the wxEVT_SHOW is not received if the window is created maximized
// // cf. https://groups.google.com/forum/#!topic/wx-users/c7ntMt6piRI
// // so we sanitize the position right away
// window_pos_sanitize(window);
// #else
// // On other platforms on the other hand it's needed to wait before the window is actually on screen
// // and some initial round of events is complete otherwise position / display index is not reported correctly.
// window->Bind(wxEVT_SHOW, [=](wxShowEvent &event) {
// CallAfter([=]() {
// window_pos_sanitize(window);
// });
// event.Skip();
// });
// #endif
on_window_geometry(window, [=]() {
window_pos_sanitize(window);
});