X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/903506828b7d042350eae97b5014a63ffca17ef5..fb42d7c3b4aa088a51fabf71203e8c5ee784d734:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index ccb09b9a12..a6f5fa3652 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1356,9 +1356,9 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton InitMouseEvent( win, event, gdk_event ); AdjustEventButtonState(event); - + // wxListBox actually get mouse events from the item - + if (win->m_isListBox) { event.m_x += widget->allocation.x; @@ -1489,7 +1489,7 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto AdjustEventButtonState(event); // wxListBox actually get mouse events from the item - + if (win->m_isListBox) { event.m_x += widget->allocation.x; @@ -2370,7 +2370,7 @@ void wxWindowGTK::Init() m_noExpose = FALSE; m_nativeSizeEvent = FALSE; - + m_hasScrolling = FALSE; m_isScrolling = FALSE; @@ -2545,7 +2545,7 @@ bool wxWindowGTK::Create( wxWindow *parent, if (m_parent) m_parent->DoAddChild( this ); - + m_focusWidget = m_wxwindow; PostCreation(); @@ -2639,7 +2639,7 @@ bool wxWindowGTK::PreCreation( wxWindowGTK *parent, const wxPoint &pos, const w void wxWindowGTK::PostCreation() { wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") ); - + if (m_wxwindow) { if (!m_noExpose) @@ -3087,7 +3087,7 @@ void wxWindowGTK::DoGetPosition( int *x, int *y ) const dx = pizza->xoffset; dy = pizza->yoffset; } - + if (x) (*x) = m_x - dx; if (y) (*y) = m_y - dy; } @@ -3280,7 +3280,7 @@ void wxWindowGTK::SetFocus() // ? } } - + #if 0 wxPrintf( "SetFocus finished in " ); if (GetClassInfo() && GetClassInfo()->GetClassName()) @@ -3755,9 +3755,9 @@ static void SetInvokingWindow( wxMenu *menu, wxWindowGTK *win ) static gint gs_pop_x = 0; static gint gs_pop_y = 0; -static void wxPopupMenuPositionCallback( GtkMenu *menu, - gint *x, gint *y, - gpointer WXUNUSED(user_data) ) +extern "C" void wxPopupMenuPositionCallback( GtkMenu *menu, + gint *x, gint *y, + gpointer WXUNUSED(user_data) ) { // ensure that the menu appears entirely on screen GtkRequisition req; @@ -3872,7 +3872,7 @@ bool wxWindowGTK::SetFont( const wxFont &font ) return TRUE; } -void wxWindowGTK::CaptureMouse() +void wxWindowGTK::DoCaptureMouse() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); @@ -3901,12 +3901,14 @@ void wxWindowGTK::CaptureMouse() g_captureWindowHasMouse = TRUE; } -void wxWindowGTK::ReleaseMouse() +void wxWindowGTK::DoReleaseMouse() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") ); + g_captureWindow = (wxWindowGTK*) NULL; + GdkWindow *window = (GdkWindow*) NULL; if (m_wxwindow) window = GTK_PIZZA(m_wxwindow)->bin_window; @@ -3917,7 +3919,6 @@ void wxWindowGTK::ReleaseMouse() return; gdk_pointer_ungrab ( (guint32)GDK_CURRENT_TIME ); - g_captureWindow = (wxWindowGTK*) NULL; } /* static */