event was not handled (as per wxMSW).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45674
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+ if ((event_type == wxEVT_LEFT_DOWN) && !win->IsOfStandardClass() &&
+ (g_focusWindow != win) && win->CanAcceptFocus())
+ {
+ gtk_widget_grab_focus( win->m_wxwindow );
+ }
+
if (event_type == wxEVT_RIGHT_DOWN)
{
// generate a "context menu" event: this is similar to right mouse
if (event_type == wxEVT_RIGHT_DOWN)
{
// generate a "context menu" event: this is similar to right mouse
// "realize" from m_widget
//-----------------------------------------------------------------------------
// "realize" from m_widget
//-----------------------------------------------------------------------------
-/* We cannot set colours and fonts before the widget has
- been realized, so we do this directly after realization. */
-
static void
gtk_window_realized_callback( GtkWidget *m_widget, wxWindow *win )
{
static void
gtk_window_realized_callback( GtkWidget *m_widget, wxWindow *win )
{
+ // We cannot set colours and fonts before the widget
+ // been realized, so we do this directly after realization
+ // or otherwise in idle time
+
+ if (win->m_needsStyleChange)
+ {
+ win->SetBackgroundStyle(win->GetBackgroundStyle());
+ win->m_needsStyleChange = false;
+ }
+
wxWindowCreateEvent event( win );
event.SetEventObject( win );
win->GTKProcessEvent( event );
wxWindowCreateEvent event( win );
event.SetEventObject( win );
win->GTKProcessEvent( event );