Fix position returned for iconized windows in wxGTK

Don't lose window position when the window is iconized, as this prevents
it from being correctly saved by wxPersitentTLW, for example, resulting
in failures in the corresponding unit test.

Unfortunately there doesn't seem to be any simple way to just ignore the
bogus (0, 0) configure events that we get from GTK when the window is
iconized, as explained in the comment, so we're reduced to remembering
the last position and restoring it when we realize that the window got
minimized and not moved, after all. This is obviously not ideal, as
there is still a lapse of time when (0, 0) is returned, but there just
doesn't seem to be anything better to do.
This commit is contained in:
Vadim Zeitlin
2019-07-16 02:22:02 +02:00
parent 8d405b80e4
commit 70f40e2f6a
2 changed files with 61 additions and 0 deletions

View File

@@ -164,6 +164,9 @@ private:
// size hint increments
int m_incWidth, m_incHeight;
// position before it last changed
wxPoint m_lastPos;
// is the frame currently iconized?
bool m_isIconized;