Commit 77b4c443 authored by Matthias Clasen's avatar Matthias Clasen

Merge branch 'wl_text_input_clean' into 'gtk-3-24'

Replace gtk_text_input with text_input_unstable_v3 support

See merge request !272
parents 5f0a14fa 8d77256d
Pipeline #22418 passed with stage
in 12 minutes and 16 seconds
......@@ -697,6 +697,14 @@ match_backend (GtkIMContextInfo *context)
{
#ifdef GDK_WINDOWING_WAYLAND
if (g_strcmp0 (context->context_id, "wayland") == 0)
{
GdkDisplay *display = gdk_display_get_default ();
return GDK_IS_WAYLAND_DISPLAY (display) &&
gdk_wayland_display_query_registry (display,
"zwp_text_input_manager_v3");
}
if (g_strcmp0 (context->context_id, "waylandgtk") == 0)
{
GdkDisplay *display = gdk_display_get_default ();
......
......@@ -1907,12 +1907,19 @@ gtk_settings_create_for_display (GdkDisplay *display)
if (GDK_IS_WAYLAND_DISPLAY (display))
{
if (gdk_wayland_display_query_registry (display,
"gtk_text_input_manager"))
"zwp_text_input_manager_v3"))
{
settings = g_object_new (GTK_TYPE_SETTINGS,
"gtk-im-module", "wayland",
NULL);
}
else if (gdk_wayland_display_query_registry (display,
"gtk_text_input_manager"))
{
settings = g_object_new (GTK_TYPE_SETTINGS,
"gtk-im-module", "waylandgtk",
NULL);
}
else
{
/* Fallback to other IM methods if the compositor does not
......
......@@ -175,8 +175,8 @@ endif
endif
protocol_built_sources = \
gtk-text-input-protocol.c \
gtk-text-input-client-protocol.h
text-input-unstable-v3-protocol.c \
text-input-unstable-v3-client-protocol.h
im_wayland_la_CPPFLAGS = $(AM_CPPFLAGS)
im_wayland_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
......@@ -191,6 +191,23 @@ WAYLAND_MODULE = im-wayland.la
endif
endif
protocol_built_sources_gtk = \
gtk-text-input-protocol.c \
gtk-text-input-client-protocol.h
im_waylandgtk_la_CPPFLAGS = $(AM_CPPFLAGS)
im_waylandgtk_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
im_waylandgtk_la_SOURCES = imwaylandgtk.c $(protocol_built_sources_gtk)
libstatic_im_waylandgtk_la_SOURCES = $(im_waylandgtk_la_SOURCES)
im_waylandgtk_la_LIBADD = $(LDADDS)
if INCLUDE_IM_WAYLAND
STATIC_WAYLANDGTK_MODULE = libstatic-im-waylandgtk.la
else
if USE_WAYLAND
WAYLANDGTK_MODULE = im-waylandgtk.la
endif
endif
multipress_defs = -DMULTIPRESS_LOCALEDIR=\""$(mplocaledir)"\" -DMULTIPRESS_CONFDIR=\""$(sysconfdir)/gtk-3.0"\"
im_multipress_la_CPPFLAGS = $(AM_CPPFLAGS) $(multipress_defs)
libstatic_im_multipress_la_CPPFLAGS = $(im_multipress_la_CPPFLAGS)
......@@ -253,6 +270,7 @@ module_LTLIBRARIES = \
$(QUARTZ_MODULE) \
$(BROADWAY_MODULE) \
$(WAYLAND_MODULE) \
$(WAYLANDGTK_MODULE) \
$(THAI_MODULE) \
$(TI_ER_MODULE) \
$(TI_ET_MODULE) \
......@@ -272,6 +290,7 @@ noinst_LTLIBRARIES = \
$(STATIC_QUARTZ_MODULE) \
$(STATIC_BROADWAY_MODULE) \
$(STATIC_WAYLAND_MODULE) \
$(STATIC_WAYLANDGTK_MODULE) \
$(STATIC_THAI_MODULE) \
$(STATIC_TI_ER_MODULE) \
$(STATIC_TI_ET_MODULE) \
......@@ -284,8 +303,8 @@ immodules.cache: Makefile.am $(module_LTLIBRARIES)
$(AM_V_GEN) $(top_builddir)/gtk/gtk-query-immodules-3.0$(EXEEXT) $(module_LTLIBRARIES) > immodules.cache
if USE_WAYLAND
BUILT_SOURCES = $(protocol_built_sources)
EXTRA_DIST += $(protocol_built_sources)
BUILT_SOURCES = $(protocol_built_sources) $(protocol_built_sources_gtk)
EXTRA_DIST += $(protocol_built_sources) $(protocol_built_sources_gtk)
endif
EXTRA_DIST += README.multipress
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -345,6 +345,7 @@ modules/input/imti-er.c
modules/input/imti-et.c
modules/input/imviqr.c
modules/input/imwayland.c
modules/input/imwaylandgtk.c
modules/input/imxim.c
modules/printbackends/cloudprint/gtkprintbackendcloudprint.c
modules/printbackends/cloudprint/gtkprintercloudprint.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment