Factor out wxTopLevelWindowGTK::GTKDoAfterShow()
Just extract the code generating wxEVT_SHOW for TLWs in wxGTK in its own function before modifying it to avoid having to do it in two places. No real changes, this is a pure refactoring.
This commit is contained in:
@@ -136,6 +136,8 @@ public:
|
|||||||
|
|
||||||
void GTKUpdateDecorSize(const DecorSize& decorSize);
|
void GTKUpdateDecorSize(const DecorSize& decorSize);
|
||||||
|
|
||||||
|
void GTKDoAfterShow();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// give hints to the Window Manager for how the size
|
// give hints to the Window Manager for how the size
|
||||||
// of the TLW can be changed by dragging
|
// of the TLW can be changed by dragging
|
||||||
|
@@ -445,9 +445,7 @@ gtk_frame_map_callback( GtkWidget*,
|
|||||||
// it is possible for m_isShown to be false here, see bug #9909
|
// it is possible for m_isShown to be false here, see bug #9909
|
||||||
if (win->wxWindowBase::Show(true))
|
if (win->wxWindowBase::Show(true))
|
||||||
{
|
{
|
||||||
wxShowEvent eventShow(win->GetId(), true);
|
win->GTKDoAfterShow();
|
||||||
eventShow.SetEventObject(win);
|
|
||||||
win->GetEventHandler()->ProcessEvent(eventShow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore focus-on-map setting in case ShowWithoutActivating() was called
|
// restore focus-on-map setting in case ShowWithoutActivating() was called
|
||||||
@@ -1499,9 +1497,8 @@ void wxTopLevelWindowGTK::GTKUpdateDecorSize(const DecorSize& decorSize)
|
|||||||
SendSizeEvent();
|
SendSizeEvent();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
wxShowEvent showEvent(GetId(), true);
|
|
||||||
showEvent.SetEventObject(this);
|
GTKDoAfterShow();
|
||||||
HandleWindowEvent(showEvent);
|
|
||||||
}
|
}
|
||||||
#endif // GDK_WINDOWING_X11
|
#endif // GDK_WINDOWING_X11
|
||||||
}
|
}
|
||||||
@@ -1523,6 +1520,13 @@ wxTopLevelWindowGTK::DecorSize& wxTopLevelWindowGTK::GetCachedDecorSize()
|
|||||||
return size[index];
|
return size[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxTopLevelWindowGTK::GTKDoAfterShow()
|
||||||
|
{
|
||||||
|
wxShowEvent showEvent(GetId(), true);
|
||||||
|
showEvent.SetEventObject(this);
|
||||||
|
HandleWindowEvent(showEvent);
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// frame title/icon
|
// frame title/icon
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user