X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9fa72bd2a637cee761c56e2ce61cec3e43c62765..92ed8becfcbb45d2b5b1e81a03fb47dba47b9580:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 60eb991902..fe8da3d23a 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -358,23 +358,25 @@ static void draw_frame( GtkWidget *widget, wxWindowGTK *win ) if (win->HasFlag(wxRAISED_BORDER)) { - gtk_draw_shadow( widget->style, - widget->window, - GTK_STATE_NORMAL, - GTK_SHADOW_OUT, - dx, dy, - widget->allocation.width-dw, widget->allocation.height-dh ); + gtk_paint_shadow (widget->style, + widget->window, + GTK_STATE_NORMAL, + GTK_SHADOW_OUT, + NULL, NULL, NULL, // FIXME: No clipping? + dx, dy, + widget->allocation.width-dw, widget->allocation.height-dh ); return; } if (win->HasFlag(wxSUNKEN_BORDER)) { - gtk_draw_shadow( widget->style, - widget->window, - GTK_STATE_NORMAL, - GTK_SHADOW_IN, - dx, dy, - widget->allocation.width-dw, widget->allocation.height-dh ); + gtk_paint_shadow (widget->style, + widget->window, + GTK_STATE_NORMAL, + GTK_SHADOW_IN, + NULL, NULL, NULL, // FIXME: No clipping? + dx, dy, + widget->allocation.width-dw, widget->allocation.height-dh ); return; } @@ -976,7 +978,12 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, bool ret = false; bool return_after_IM = false; - if( wxTranslateGTKKeyEventToWx(event, win, gdk_event) == false ) + if( wxTranslateGTKKeyEventToWx(event, win, gdk_event) ) + { + // Emit KEY_DOWN event + ret = win->GetEventHandler()->ProcessEvent( event ); + } + else { // Return after IM processing as we cannot do // anything with it anyhow. @@ -1011,9 +1018,6 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, if (return_after_IM) return false; - // Emit KEY_DOWN event - ret = win->GetEventHandler()->ProcessEvent( event ); - #if wxUSE_ACCEL if (!ret) { @@ -2016,7 +2020,6 @@ static gint gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_ extern "C" { static void gtk_window_vscroll_callback( GtkAdjustment *adjust, - SCROLLBAR_CBACK_ARG wxWindowGTK *win ) { DEBUG_MAIN_THREAD @@ -2033,7 +2036,7 @@ static void gtk_window_vscroll_callback( GtkAdjustment *adjust, win->m_oldVerticalPos = adjust->value; - wxEventType command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(sw->vscrollbar)); + wxEventType command = GtkScrollWinTypeToWx(GTK_SCROLL_JUMP); int value = (int)(adjust->value+0.5); @@ -2049,7 +2052,6 @@ static void gtk_window_vscroll_callback( GtkAdjustment *adjust, extern "C" { static void gtk_window_hscroll_callback( GtkAdjustment *adjust, - SCROLLBAR_CBACK_ARG wxWindowGTK *win ) { DEBUG_MAIN_THREAD @@ -2063,7 +2065,7 @@ static void gtk_window_hscroll_callback( GtkAdjustment *adjust, float diff = adjust->value - win->m_oldHorizontalPos; if (fabs(diff) < 0.2) return; - wxEventType command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(sw->hscrollbar)); + wxEventType command = GtkScrollWinTypeToWx(GTK_SCROLL_JUMP); win->m_oldHorizontalPos = adjust->value;