diff --git a/include/wx/gtk/private/event.h b/include/wx/gtk/private/event.h index c91332eed8..ac3a3eaf8a 100644 --- a/include/wx/gtk/private/event.h +++ b/include/wx/gtk/private/event.h @@ -94,6 +94,17 @@ template void InitMouseEvent(wxWindowGTK *win, // contain the mouse pointer. bool SetWindowUnderMouse(wxWindowGTK* win); +// Implementation of enter/leave window callbacks. +gboolean +WindowEnterCallback(GtkWidget* widget, + GdkEventCrossing* event, + wxWindowGTK* win); + +gboolean +WindowLeaveCallback(GtkWidget* widget, + GdkEventCrossing* event, + wxWindowGTK* win); + } // namespace wxGTKImpl #endif // _GTK_PRIVATE_EVENT_H_ diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index b05eda48eb..0f9e4233df 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2246,14 +2246,16 @@ wx_window_focus_callback(GtkWidget *widget, return FALSE; } +} // extern "C" + //----------------------------------------------------------------------------- // "enter_notify_event" //----------------------------------------------------------------------------- -static gboolean -gtk_window_enter_callback( GtkWidget* widget, - GdkEventCrossing *gdk_event, - wxWindowGTK *win ) +gboolean +wxGTKImpl::WindowEnterCallback(GtkWidget* widget, + GdkEventCrossing* gdk_event, + wxWindowGTK* win) { wxLogTrace(TRACE_MOUSE, "Window enter in %s (window %p) for window %p", wxDumpWindow(win), gtk_widget_get_window(widget), gdk_event->window); @@ -2297,14 +2299,26 @@ gtk_window_enter_callback( GtkWidget* widget, return win->GTKProcessEvent(event); } +extern "C" { + +static gboolean +gtk_window_enter_callback( GtkWidget* widget, + GdkEventCrossing *gdk_event, + wxWindowGTK *win ) +{ + return wxGTKImpl::WindowEnterCallback(widget, gdk_event, win); +} + +} // extern "C" + //----------------------------------------------------------------------------- // "leave_notify_event" //----------------------------------------------------------------------------- -static gboolean -gtk_window_leave_callback( GtkWidget* widget, - GdkEventCrossing *gdk_event, - wxWindowGTK *win ) +gboolean +wxGTKImpl::WindowLeaveCallback(GtkWidget* widget, + GdkEventCrossing* gdk_event, + wxWindowGTK* win) { wxLogTrace(TRACE_MOUSE, "Window leave in %s (window %p) for window %p", wxDumpWindow(win), gtk_widget_get_window(widget), gdk_event->window); @@ -2331,6 +2345,16 @@ gtk_window_leave_callback( GtkWidget* widget, return win->GTKProcessEvent(event); } +extern "C" { + +static gboolean +gtk_window_leave_callback( GtkWidget* widget, + GdkEventCrossing *gdk_event, + wxWindowGTK *win ) +{ + return wxGTKImpl::WindowLeaveCallback(widget, gdk_event, win); +} + //----------------------------------------------------------------------------- // "value_changed" from scrollbar //-----------------------------------------------------------------------------