Fix bug with showing TLW in wxMSW when restoring its geometry

Since the changes of 6ae7aa4443, the
windows were shown when their geometry was restored as a side effect of
calling ::SetWindowPlacement(). This was unexpected and resulted in
flicker on startup, so fix this by explicitly passing SW_HIDE to
SetWindowPlacement() if the window is currently hidden and storing the
real show command inside wxTLW itself, where it will be used when it's
finally shown.
This commit is contained in:
Vadim Zeitlin
2018-06-22 03:25:43 +02:00
parent 3518f1a7d8
commit cf20a9ced5
3 changed files with 31 additions and 2 deletions

View File

@@ -116,6 +116,9 @@ public:
// returns true if the platform should explicitly apply a theme border
virtual bool CanApplyThemeBorder() const wxOVERRIDE { return false; }
// This function is only for internal use.
void MSWSetShowCommand(WXUINT showCmd) { m_showCmd = showCmd; }
protected:
// common part of all ctors
void Init();