extern bool g_blockEventsOnScroll;
extern wxCursor g_globalCursor;
-static GdkGC *g_eraseGC = NULL;
-
// mouse capture state: the window which has it and if the mouse is currently
// inside it
static wxWindowGTK *g_captureWindow = (wxWindowGTK*) NULL;
}
}
-
-
-
-
// win is a control: tab can be propagated up
if ( !ret &&
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
ret = win->GetParent()->GetEventHandler()->ProcessEvent( new_event );
}
- if (ret)
- {
- g_signal_stop_emission_by_name (widget, "key_press_event");
- return TRUE;
- }
-
- return FALSE;
+ return ret;
}
}
return FALSE;
}
- if ( !win->GetEventHandler()->ProcessEvent( event ) )
- return FALSE;
-
- g_signal_stop_emission_by_name (widget, "key_release_event");
- return TRUE;
+ return win->GetEventHandler()->ProcessEvent(event);
}
}
if (win->GetEventHandler()->ProcessEvent( event ))
{
- g_signal_stop_emission_by_name (widget, "button_press_event");
return TRUE;
}
event.SetEventObject( win );
event.SetId( win->GetId() );
- if (win->GetEventHandler()->ProcessEvent( event ))
- {
- g_signal_stop_emission_by_name (widget, "button_release_event");
- return TRUE;
- }
-
- return FALSE;
+ return win->GetEventHandler()->ProcessEvent(event);
}
//-----------------------------------------------------------------------------
}
}
- if (win->GetEventHandler()->ProcessEvent( event ))
- {
- g_signal_stop_emission_by_name (widget, "motion_notify_event");
- return TRUE;
- }
-
- return FALSE;
+ return win->GetEventHandler()->ProcessEvent(event);
}
//-----------------------------------------------------------------------------
}
}
- if (win->GetEventHandler()->ProcessEvent( event ))
- {
- g_signal_stop_emission_by_name (widget, "enter_notify_event");
- return TRUE;
- }
-
- return FALSE;
+ return win->GetEventHandler()->ProcessEvent(event);
}
//-----------------------------------------------------------------------------
event.m_x = x + pt.x;
event.m_y = y + pt.y;
- if (win->GetEventHandler()->ProcessEvent( event ))
- {
- g_signal_stop_emission_by_name (widget, "leave_notify_event");
- return TRUE;
- }
-
- return FALSE;
+ return win->GetEventHandler()->ProcessEvent(event);
}
//-----------------------------------------------------------------------------
m_needsStyleChange = false;
}
- // Update invalidated regions.
- GtkUpdate();
-
wxCursor cursor = m_cursor;
if (g_globalCursor.Ok()) cursor = g_globalCursor;
const size_t count = windowsThis.size();
for ( size_t n = 0; n < count; n++ )
{
- gdk_window_set_cursor(windowsThis[n], cursor.GetCursor());
+ GdkWindow *win = windowsThis[n];
+ if ( !win )
+ {
+ wxFAIL_MSG(_T("NULL window returned by GTKGetWindow()?"));
+ continue;
+ }
+
+ gdk_window_set_cursor(win, cursor.GetCursor());
}
}
}
gtk_grab_remove( (GtkWidget*) window->GetHandle() );
}
-// ----------------------------------------------------------------------------
-// wxWinModule
-// ----------------------------------------------------------------------------
-
-class wxWinModule : public wxModule
-{
-public:
- bool OnInit();
- void OnExit();
-
-private:
- DECLARE_DYNAMIC_CLASS(wxWinModule)
-};
-
-IMPLEMENT_DYNAMIC_CLASS(wxWinModule, wxModule)
-
-bool wxWinModule::OnInit()
-{
- // g_eraseGC = gdk_gc_new( gdk_get_default_root_window() );
- // gdk_gc_set_fill( g_eraseGC, GDK_SOLID );
-
- return true;
-}
-
-void wxWinModule::OnExit()
-{
- if (g_eraseGC)
- g_object_unref (g_eraseGC);
-}