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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user