From 94f863f33e92f96d7a3d32ddab8a3fe9fa6a64fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Mon, 28 Sep 2015 15:33:36 +0200 Subject: [PATCH] ui.backend.gtk: make it so configure-im is called after realize (#1307) gtk_im_context_set_client_window must be called with a realized window otherwise IM won't work, http://lists.maemo.org/pipermail//maemo-developers/2006-January/002337.html --- basis/ui/backend/gtk/gtk-docs.factor | 7 +++++++ basis/ui/backend/gtk/gtk.factor | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 basis/ui/backend/gtk/gtk-docs.factor diff --git a/basis/ui/backend/gtk/gtk-docs.factor b/basis/ui/backend/gtk/gtk-docs.factor new file mode 100644 index 0000000000..5c928900d2 --- /dev/null +++ b/basis/ui/backend/gtk/gtk-docs.factor @@ -0,0 +1,7 @@ +USING: gtk.ffi help.markup help.syntax ; +IN: ui.backend.gtk + +HELP: configure-im +{ $values { "win" GtkWindow } { "im" GtkIMContext } } +{ $description "Configures the input methods of the window. Must only be run after the window hasbeen realized." } +{ $see-also gtk_widget_realize } ; diff --git a/basis/ui/backend/gtk/gtk.factor b/basis/ui/backend/gtk/gtk.factor index 87846ffe78..50f00a43f2 100644 --- a/basis/ui/backend/gtk/gtk.factor +++ b/basis/ui/backend/gtk/gtk.factor @@ -467,11 +467,11 @@ M:: gtk-ui-backend (open-window) ( world -- ) gtk_window_set_wmclass world configure-gl + win gtk_widget_realize + win im configure-im win connect-user-input-signals win connect-win-state-signals - - win gtk_widget_realize win world window-controls>> configure-window-controls win gtk_widget_show_all ;