Fix saving/restoring window position for maximized windows
Save both the normal window geometry and its maximized position instead of saving just its current position. This fixes restoring geometry of the maximized windows as previously they were always restored on the primary monitor, as their original position was lost. Use the native {Get,Set}WindowPlacement() functions for a MSW-specific wxTLWGeometry implementation to achieve this. Closes #16335.
This commit is contained in:
@@ -57,6 +57,9 @@ public:
|
||||
#define wxPERSIST_TLW_MAXIMIZED "Maximized"
|
||||
#define wxPERSIST_TLW_ICONIZED "Iconized"
|
||||
|
||||
// MSW has its own native implementation and doesn't use this class.
|
||||
#ifndef __WXMSW__
|
||||
|
||||
class wxTLWGeometryGeneric : public wxTLWGeometryBase
|
||||
{
|
||||
public:
|
||||
@@ -166,8 +169,12 @@ private:
|
||||
bool m_maximized;
|
||||
};
|
||||
|
||||
#endif // !__WXMSW__
|
||||
|
||||
#ifdef __WXGTK20__
|
||||
#include "wx/gtk/private/tlwgeom.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/private/tlwgeom.h"
|
||||
#else
|
||||
class wxTLWGeometry : public wxTLWGeometryGeneric
|
||||
{
|
||||
|
Reference in New Issue
Block a user