X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89267fe552799e2baeadae4c88fc53508974339d..2e334012b4babcf063fbe79540c4c154cd54ab2b:/src/gtk/window.cpp?ds=inline diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index e2626da0a8..5634ab6e2b 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -258,39 +258,15 @@ void wxgtk_window_size_request_callback(GtkWidget * WXUNUSED(widget), extern "C" { static gboolean -gtk_window_expose_callback( GtkWidget*, +gtk_window_expose_callback( GtkWidget* widget, GdkEventExpose *gdk_event, wxWindow *win ) { -#if 0 - if (win->GetName()) + if (gdk_event->window == widget->window) { - wxPrintf( wxT("OnExpose from ") ); - if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) - wxPrintf( win->GetClassInfo()->GetClassName() ); - wxPrintf( wxT(" %d %d %d %d\n"), (int)gdk_event->area.x, - (int)gdk_event->area.y, - (int)gdk_event->area.width, - (int)gdk_event->area.height ); + win->GetUpdateRegion() = wxRegion( gdk_event->region ); + win->GtkSendPaintEvents(); } - - gtk_paint_box - ( - win->m_wxwindow->style, - pizza->bin_window, - GTK_STATE_NORMAL, - GTK_SHADOW_OUT, - (GdkRectangle*) NULL, - win->m_wxwindow, - (char *)"button", // const_cast - 20,20,24,24 - ); -#endif - - win->GetUpdateRegion() = wxRegion( gdk_event->region ); - - win->GtkSendPaintEvents(); - // Let parent window draw window-less widgets return FALSE; } @@ -524,11 +500,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar) case GDK_KP_7: case GDK_KP_8: case GDK_KP_9: - key_code = (isChar ? '0' : WXK_NUMPAD0) + keysym - GDK_KP_0; + key_code = (isChar ? '0' : int(WXK_NUMPAD0)) + keysym - GDK_KP_0; break; case GDK_KP_Space: - key_code = isChar ? ' ' : WXK_NUMPAD_SPACE; + key_code = isChar ? ' ' : int(WXK_NUMPAD_SPACE); break; case GDK_KP_Tab: @@ -600,32 +576,32 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar) break; case GDK_KP_Equal: - key_code = isChar ? '=' : WXK_NUMPAD_EQUAL; + key_code = isChar ? '=' : int(WXK_NUMPAD_EQUAL); break; case GDK_KP_Multiply: - key_code = isChar ? '*' : WXK_NUMPAD_MULTIPLY; + key_code = isChar ? '*' : int(WXK_NUMPAD_MULTIPLY); break; case GDK_KP_Add: - key_code = isChar ? '+' : WXK_NUMPAD_ADD; + key_code = isChar ? '+' : int(WXK_NUMPAD_ADD); break; case GDK_KP_Separator: // FIXME: what is this? - key_code = isChar ? '.' : WXK_NUMPAD_SEPARATOR; + key_code = isChar ? '.' : int(WXK_NUMPAD_SEPARATOR); break; case GDK_KP_Subtract: - key_code = isChar ? '-' : WXK_NUMPAD_SUBTRACT; + key_code = isChar ? '-' : int(WXK_NUMPAD_SUBTRACT); break; case GDK_KP_Decimal: - key_code = isChar ? '.' : WXK_NUMPAD_DECIMAL; + key_code = isChar ? '.' : int(WXK_NUMPAD_DECIMAL); break; case GDK_KP_Divide: - key_code = isChar ? '/' : WXK_NUMPAD_DIVIDE; + key_code = isChar ? '/' : int(WXK_NUMPAD_DIVIDE); break; @@ -2140,6 +2116,8 @@ bool wxWindowGTK::Create( wxWindow *parent, m_focusWidget = m_wxwindow; + SetCanFocus(AcceptsFocus()); + PostCreation(); return true; @@ -2441,8 +2419,6 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags if (height != -1) m_height = height; - ConstrainSize(); - if (m_parent->m_wxwindow) { wxPizza* pizza = WX_PIZZA(m_parent->m_wxwindow);