Update TLW client size in wxGTK before sending wxEVT_SHOW
If we have to change the client size, it's better to do this before sending the event whose handler might rely on the size being already correct. Co-Authored-By: Paul Cornett <paulcor@users.noreply.github.com>
This commit is contained in:
@@ -1545,15 +1545,15 @@ wxTopLevelWindowGTK::DecorSize& wxTopLevelWindowGTK::GetCachedDecorSize()
|
||||
|
||||
void wxTopLevelWindowGTK::GTKDoAfterShow()
|
||||
{
|
||||
wxShowEvent showEvent(GetId(), true);
|
||||
showEvent.SetEventObject(this);
|
||||
HandleWindowEvent(showEvent);
|
||||
|
||||
#ifdef __WXGTK3__
|
||||
// Set the client size again if necessary, we should be able to do it
|
||||
// correctly by now as the style cache should be up to date.
|
||||
GTKUpdateClientSizeIfNecessary();
|
||||
#endif // __WXGTK3__
|
||||
|
||||
wxShowEvent showEvent(GetId(), true);
|
||||
showEvent.SetEventObject(this);
|
||||
HandleWindowEvent(showEvent);
|
||||
}
|
||||
|
||||
#ifdef __WXGTK3__
|
||||
|
Reference in New Issue
Block a user