Use a single wxTopLevelWindow::m_showCmd flag in wxMSW

This single field replaces m_iconized and m_maximizeOnShow which were
not really independent and will make it simpler to schedule either
maximizing or maximizing the window later, when it can't be done
immediately because the window is hidden, in the following commit.
This commit is contained in:
Vadim Zeitlin
2018-06-22 03:23:31 +02:00
parent f03d655b1a
commit 3518f1a7d8
4 changed files with 67 additions and 54 deletions

View File

@@ -132,9 +132,12 @@ protected:
const wxPoint& pos,
const wxSize& size);
// common part of Iconize(), Maximize() and Restore()
// Just a wrapper around MSW ShowWindow().
void DoShowWindow(int nShowCmd);
// Return true if the window is iconized at MSW level, ignoring m_showCmd.
bool MSWIsIconized() const;
// override those to return the normal window coordinates even when the
// window is minimized
virtual void DoGetPosition(int *x, int *y) const wxOVERRIDE;
@@ -156,13 +159,11 @@ protected:
int& x, int& y,
int& w, int& h) const wxOVERRIDE;
// is the window currently iconized?
bool m_iconized;
// should the frame be maximized when it will be shown? set by Maximize()
// when it is called while the frame is hidden
bool m_maximizeOnShow;
// This field contains the show command to use when showing the window the
// next time and also indicates whether the window should be considered
// being iconized or maximized (which may be different from whether it's
// actually iconized or maximized at MSW level).
WXUINT m_showCmd;
// Data to save/restore when calling ShowFullScreen
long m_fsStyle; // Passed to ShowFullScreen