- gtk_widget_add_events(m_widget, GDK_PROPERTY_CHANGE_MASK);
- g_signal_connect(m_widget, "property_notify_event",
- G_CALLBACK(property_notify_event), this);
+ // We need to customize the default GTK+ logic for key processing to make
+ // it conforming to wxWidgets event processing order.
+ g_signal_connect (m_widget, "key_press_event",
+ G_CALLBACK (wxgtk_tlw_key_press_event), NULL);
+
+#ifdef GDK_WINDOWING_X11
+#ifdef __WXGTK3__
+ if (GDK_IS_X11_SCREEN(gtk_window_get_screen(GTK_WINDOW(m_widget))))
+#endif
+ {
+ gtk_widget_add_events(m_widget, GDK_PROPERTY_CHANGE_MASK);
+ g_signal_connect(m_widget, "property_notify_event",
+ G_CALLBACK(property_notify_event), this);
+ }
+#endif // GDK_WINDOWING_X11
+
+ // translate wx decorations styles into Motif WM hints (they are recognized
+ // by other WMs as well)
+
+ // always enable moving the window as we have no separate flag for enabling
+ // it
+ m_gdkFunc = GDK_FUNC_MOVE;
+
+ if ( style & wxCLOSE_BOX )
+ m_gdkFunc |= GDK_FUNC_CLOSE;
+
+ if ( style & wxMINIMIZE_BOX )
+ m_gdkFunc |= GDK_FUNC_MINIMIZE;
+
+ if ( style & wxMAXIMIZE_BOX )
+ m_gdkFunc |= GDK_FUNC_MAXIMIZE;