#18161: wxSplashScreen broken after TLW changes

13 views
Skip to first unread message

wxTrac

unread,
Jul 5, 2018, 8:28:28 AM7/5/18
to wx-...@googlegroups.com
#18161: wxSplashScreen broken after TLW changes
-----------------------------------+-------------------------
Reporter: MaartenB | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxMSW | Version: dev-latest
Keywords: wxSplashScreen splash | Blocked By:
Blocking: | Patch: 0
-----------------------------------+-------------------------
Changes from [https://github.com/wxWidgets/wxWidgets/pull/842 PR842 (Fix
showing TLW when restoring its geometry in wxMSW)] have broken
wxSplashScreen. Only a gray popup with a small white square in the top-
left corner is shown.
Reproducable in the splash sample.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18161>

wxTrac

unread,
Jul 5, 2018, 10:06:03 AM7/5/18
to wx-...@googlegroups.com
#18161: wxSplashScreen broken after TLW changes
-----------------------+-----------------------------------
Reporter: MaartenB | Owner: vadz
Type: defect | Status: accepted
Priority: normal | Milestone:
Component: wxMSW | Version: dev-latest
Resolution: | Keywords: wxSplashScreen splash
Blocked By: | Blocking:
Patch: 0 |
-----------------------+-----------------------------------
Changes (by vadz):

* owner: => vadz
* status: new => accepted


Comment:

Oops. Will look, thanks.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18161#comment:1>

wxTrac

unread,
Jul 5, 2018, 10:30:41 AM7/5/18
to wx-...@googlegroups.com
#18161: wxSplashScreen broken after TLW changes
-----------------------+-----------------------------------
Reporter: MaartenB | Owner: vadz
Type: defect | Status: accepted
Priority: normal | Milestone:
Component: wxMSW | Version: dev-latest
Resolution: | Keywords: wxSplashScreen splash
Blocked By: | Blocking:
Patch: 0 |
-----------------------+-----------------------------------

Comment (by vadz):

OK, so this is due to a missing initial `wxEVT_SIZE` event and can be
easily fixed by adding `DoLayout()` to `wxSplashScreen` ctor. But the real
fix is almost certainly to ensure that the event is still sent, as it
apparently was before, although I'm not sure why exactly did this change.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18161#comment:2>

wxTrac

unread,
Jul 5, 2018, 1:26:49 PM7/5/18
to wx-...@googlegroups.com
#18161: wxSplashScreen broken after TLW changes
-----------------------+-----------------------------------
Reporter: MaartenB | Owner: vadz
Type: defect | Status: accepted
Priority: normal | Milestone:
Component: wxMSW | Version: dev-latest
Resolution: | Keywords: wxSplashScreen splash
Blocked By: | Blocking:
Patch: 0 |
-----------------------+-----------------------------------

Comment (by MaartenB):

The root cause is returning `true` in `HandleSize` (after
[https://github.com/wxWidgets/wxWidgets/commit/cf20a9ced531d502433b5acc25a3bd84505f5fe5
#diff-ba752310b6edad3257662bc734cf0d4cR749 this] change), returning
`false` or removing the added code fixes the issue.

I haven't noticed to flicker bug, so I don't know if this was needed to
fix it.

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18161#comment:3>

wxTrac

unread,
Jul 5, 2018, 1:38:15 PM7/5/18
to wx-...@googlegroups.com
#18161: wxSplashScreen broken after TLW changes
-----------------------+-----------------------------------
Reporter: MaartenB | Owner: vadz
Type: defect | Status: accepted
Priority: normal | Milestone:
Component: wxMSW | Version: dev-latest
Resolution: | Keywords: wxSplashScreen splash
Blocked By: | Blocking:
Patch: 0 |
-----------------------+-----------------------------------

Comment (by vadz):

Thank you, this is indeed the reason for the missing `wxEVT_SIZE`. I think
returning false is the right thing to do, so I'll fix it like this.

Just FYI, flickering was pretty horrible in any program which called
`wxPersistentRegisterAndRestore()` first and then created/initialized its
main window contents (like one of mine), as the frame was shown as soon as
`wxPersistentRegisterAndRestore()` was called and not only when `Show()`
was called at the end, so it was a pretty bad bug.

And, to be complete, it has nothing to do with the flickering I see in the
splash sample which seems to be due to `wxMediaCtrl` being created as
child of splash screen window (here I don't see it at all under MSW,
unlike under Linux).

Thanks again for finding this bug!

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18161#comment:4>

wxTrac

unread,
Jul 5, 2018, 1:43:02 PM7/5/18
to wx-...@googlegroups.com
#18161: wxSplashScreen broken after TLW changes
-----------------------+-----------------------------------
Reporter: MaartenB | Owner: vadz
Type: defect | Status: closed
Priority: normal | Milestone:
Component: wxMSW | Version: dev-latest
Resolution: fixed | Keywords: wxSplashScreen splash
Blocked By: | Blocking:
Patch: 0 |
-----------------------+-----------------------------------
Changes (by Vadim Zeitlin <vadim@…>):

* status: accepted => closed
* resolution: => fixed


Comment:

In [changeset:"9121b906e83d3038a772b24de2cbf979b99ff04f/git-wxWidgets"
9121b906e/git-wxWidgets]:
{{{
#!CommitTicketReference repository="git-wxWidgets"
revision="9121b906e83d3038a772b24de2cbf979b99ff04f"
Restore initial wxEVT_SIZE generation for hidden frames in wxMSW

Changes of commit cf20a9ced531d502433b5acc25a3bd84505f5fe5 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.
}}}

--
Ticket URL: <https://trac.wxwidgets.org/ticket/18161#comment:5>
Reply all
Reply to author
Forward
0 new messages