summaryrefslogtreecommitdiff
path: root/gtk/gtkimmodule.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-11-13 12:20:07 +0100
committerAlexander Larsson <alexl@redhat.com>2013-11-13 12:23:06 +0100
commit4226f97d540ecd8cb5995184bfba7a1102560740 (patch)
tree8be015371a590bba0143c3ebb337ee934c4cdcfd /gtk/gtkimmodule.c
parentca89f5ab93da6745fb7f5d3483ed2943fce6f94e (diff)
downloadgtk+-4226f97d540ecd8cb5995184bfba7a1102560740.tar.gz
broadway: Support ipad on-screen keyboard
We add a custom im module for broadway that calls some broadway specific APIs to show/hide the keyboard on focus in/out. We then forward this to the browser, and on the ipad we focus an input field to activate the keyboard.
Diffstat (limited to 'gtk/gtkimmodule.c')
-rw-r--r--gtk/gtkimmodule.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c
index 1660ba34e0..ab3442d8f6 100644
--- a/gtk/gtkimmodule.c
+++ b/gtk/gtkimmodule.c
@@ -45,6 +45,10 @@
#include "wayland/gdkwayland.h"
#endif
+#ifdef GDK_WINDOWING_BROADWAY
+#include "broadway/gdkbroadway.h"
+#endif
+
#ifdef GDK_WINDOWING_WIN32
#include "win32/gdkwin32.h"
#endif
@@ -381,6 +385,9 @@ gtk_im_module_initialize (void)
#ifdef INCLUDE_IM_xim
do_builtin (xim);
#endif
+#ifdef INCLUDE_IM_broadway
+ do_builtin (broadway);
+#endif
#undef do_builtin
@@ -662,6 +669,11 @@ match_backend (GtkIMContextInfo *context)
return GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ());
#endif
+#ifdef GDK_WINDOWING_BROADWAY
+ if (g_strcmp0 (context->context_id, "broadway") == 0)
+ return GDK_IS_BROADWAY_DISPLAY (gdk_display_get_default ());
+#endif
+
#ifdef GDK_WINDOWING_X11
if (g_strcmp0 (context->context_id, "xim") == 0)
return GDK_IS_X11_DISPLAY (gdk_display_get_default ());