Restore initial wxEVT_SIZE generation for hidden frames in wxMSW
Changes of commit cf20a9ced5
suppressed
the generation of the initial wxEVT_SIZE for hidden wxFrames, as the
initial WM_SIZE was ignored. This went unnoticed for "normal" frames,
which got another WM_SIZE when they were shown in any case, but broke
frames with wxFRAME_TOOL_WINDOW style as they're shown using SW_SHOWNA
command and in addition to suppressing activation, it also suppresses
the generation of WM_SIZE, so such frames didn't get any wxEVT_SIZE at
all and appeared without being laid out properly, as could be seen, for
example, in the splash sample.
Fix this by continuing to generate the size events even for hidden
frames, just as we did before, while still skipping all the other stuff
which is not necessary for the hidden windows.
See https://github.com/wxWidgets/wxWidgets/pull/842
Closes #18161.
This commit is contained in:
parent
6d02c45867
commit
9121b906e8
@ -744,10 +744,11 @@ bool wxFrame::MSWDoTranslateMessage(wxFrame *frame, WXMSG *pMsg)
|
||||
bool wxFrame::HandleSize(int WXUNUSED(x), int WXUNUSED(y), WXUINT id)
|
||||
{
|
||||
// We can get a WM_SIZE when restoring a hidden window using
|
||||
// SetWindowPlacement(), don't do anything in this case as our state will
|
||||
// be really updated later, when (and if) we're shown.
|
||||
// SetWindowPlacement(), don't do anything here in this case as our state
|
||||
// will be really updated later, when (and if) we're shown. Still let the
|
||||
// base class generate wxEVT_SIZE and perform the layout, however.
|
||||
if ( !IsShown() )
|
||||
return true;
|
||||
return false;
|
||||
|
||||
switch ( id )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user