From 1d2b0e61d2e86f25911924c4d26c26334a03e7e2 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Thu, 16 Feb 2023 01:13:45 -0800 Subject: [PATCH 1/3] ibus: add activate-surrounding-text property Add missing surrounding-text features used by gnome-shell 43.3. --- ...d515d9d53fc692af252f610b009660494e21.patch | 155 ++++++++++++++++++ srcpkgs/ibus/template | 6 +- 2 files changed, 158 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/ibus/patches/ddead515d9d53fc692af252f610b009660494e21.patch diff --git a/srcpkgs/ibus/patches/ddead515d9d53fc692af252f610b009660494e21.patch b/srcpkgs/ibus/patches/ddead515d9d53fc692af252f610b009660494e21.patch new file mode 100644 index 000000000000..6a5c6391a80f --- /dev/null +++ b/srcpkgs/ibus/patches/ddead515d9d53fc692af252f610b009660494e21.patch @@ -0,0 +1,155 @@ +From ddead515d9d53fc692af252f610b009660494e21 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Wed, 21 Sep 2022 21:08:33 +0900 +Subject: [PATCH] client/gtk2: Update surrounding text properties by focus in + +ibus_input_context_set_surrounding_text() should be succeeded +if input contexts are different so that ibus engines can +update surrounding text properties with focus in event. + +When an input context is created newly, RequireSurroundingText D-Bus +signal could not be received yet and set_surrounding_text() is failed. +Now "require-surrounding-text" signal is added to IBusInputContext +and clients can call set_surrounding_text() later. + +BUG=https://github.com/ibus/ibus/issues/2423 +--- + client/gtk2/ibusimcontext.c | 25 +++++++++++++++++++++++++ + src/ibusinputcontext.c | 29 ++++++++++++++++++++++++++++- + 2 files changed, 53 insertions(+), 1 deletion(-) + +diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c +index eaf7eb90f..6e338157c 100644 +--- a/client/gtk2/ibusimcontext.c ++++ b/client/gtk2/ibusimcontext.c +@@ -70,6 +70,7 @@ struct _IBusIMContext { + #endif + + IBusInputContext *ibuscontext; ++ IBusInputContext *ibuscontext_needs_surrounding; + + /* preedit status */ + gchar *preedit_string; +@@ -985,6 +986,7 @@ ibus_im_context_init (GObject *obj) + ibusimcontext->cursor_area.height = 0; + + ibusimcontext->ibuscontext = NULL; ++ ibusimcontext->ibuscontext_needs_surrounding = NULL; + ibusimcontext->has_focus = FALSE; + ibusimcontext->time = GDK_CURRENT_TIME; + #ifdef ENABLE_SURROUNDING +@@ -2183,6 +2185,18 @@ _ibus_context_hide_preedit_text_cb (IBusInputContext *ibuscontext, + g_signal_emit (ibusimcontext, _signal_preedit_end_id, 0); + } + ++static void ++_ibus_context_require_surrounding_text_cb (IBusInputContext *ibuscontext, ++ IBusIMContext *ibusimcontext) ++{ ++ IDEBUG ("%s", __FUNCTION__); ++ g_assert (ibusimcontext->ibuscontext == ibuscontext); ++ if (ibusimcontext->ibuscontext_needs_surrounding == ibuscontext) { ++ _request_surrounding_text (ibusimcontext); ++ ibusimcontext->ibuscontext_needs_surrounding = NULL; ++ } ++} ++ + static void + _ibus_context_destroy_cb (IBusInputContext *ibuscontext, + IBusIMContext *ibusimcontext) +@@ -2249,6 +2263,11 @@ _create_input_context_done (IBusBus *bus, + "hide-preedit-text", + G_CALLBACK (_ibus_context_hide_preedit_text_cb), + ibusimcontext); ++ g_signal_connect ( ++ ibusimcontext->ibuscontext, ++ "require-surrounding-text", ++ G_CALLBACK (_ibus_context_require_surrounding_text_cb), ++ ibusimcontext); + g_signal_connect (ibusimcontext->ibuscontext, "destroy", + G_CALLBACK (_ibus_context_destroy_cb), + ibusimcontext); +@@ -2265,6 +2284,12 @@ _create_input_context_done (IBusBus *bus, + + ibus_input_context_focus_in (ibusimcontext->ibuscontext); + _set_cursor_location_internal (ibusimcontext); ++ if (ibus_input_context_needs_surrounding_text ( ++ ibusimcontext->ibuscontext)) { ++ _request_surrounding_text (ibusimcontext); ++ } else { ++ ibusimcontext->ibuscontext_needs_surrounding = ibusimcontext->ibuscontext; ++ } + } + + if (!g_queue_is_empty (ibusimcontext->events_queue)) { +diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c +index 7981de381..28ae04ad9 100644 +--- a/src/ibusinputcontext.c ++++ b/src/ibusinputcontext.c +@@ -2,7 +2,7 @@ + /* vim:set et sts=4: */ + /* ibus - The Input Bus + * Copyright (C) 2008-2013 Peng Huang +- * Copyright (C) 2018-2019 Takao Fujiwara ++ * Copyright (C) 2018-2022 Takao Fujiwara + * Copyright (C) 2008-2019 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or +@@ -55,6 +55,7 @@ enum { + CURSOR_DOWN_LOOKUP_TABLE, + REGISTER_PROPERTIES, + UPDATE_PROPERTY, ++ REQUIRE_SURROUNDING_TEXT, + LAST_SIGNAL, + }; + +@@ -488,6 +489,21 @@ ibus_input_context_class_init (IBusInputContextClass *class) + 1, + IBUS_TYPE_PROPERTY); + ++ /** ++ * IBusInputContext::require-surrounding-text: ++ * @context: An IBusInputContext. ++ * ++ * Emitted to receive the RequireSurroundingText signal from the daemon. ++ */ ++ context_signals[REQUIRE_SURROUNDING_TEXT] = ++ g_signal_new (I_("require-surrounding-text"), ++ G_TYPE_FROM_CLASS (class), ++ G_SIGNAL_RUN_LAST, ++ 0, ++ NULL, NULL, ++ _ibus_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ + text_empty = ibus_text_new_from_static_string (""); + g_object_ref_sink (text_empty); + } +@@ -735,6 +751,7 @@ ibus_input_context_g_signal (GDBusProxy *proxy, + + if (g_strcmp0 (signal_name, "RequireSurroundingText") == 0) { + priv->needs_surrounding_text = TRUE; ++ g_signal_emit (context, context_signals[REQUIRE_SURROUNDING_TEXT], 0); + return; + } + +@@ -1116,9 +1133,19 @@ ibus_input_context_set_surrounding_text (IBusInputContext *context, + + priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context); + ++ /* This API should send "SetSurroundingText" D-Bus method when ++ * input contexts are switched between tabs in a text application ++ * so that engines can receive the updated surrounding texts after ++ * focus-in events happen. ++ * ++ * GNOME shell uses a single input context and the address of the input ++ * contexts are always same. So check the address of texts if the input ++ * contexts on applications are switched. ++ */ + if (cursor_pos != priv->surrounding_cursor_pos || + anchor_pos != priv->selection_anchor_pos || + priv->surrounding_text == NULL || ++ text != priv->surrounding_text || + g_strcmp0 (text->text, priv->surrounding_text->text) != 0) { + if (priv->surrounding_text) + g_object_unref (priv->surrounding_text); diff --git a/srcpkgs/ibus/template b/srcpkgs/ibus/template index 77a7a06a3037..c5453e400e33 100644 --- a/srcpkgs/ibus/template +++ b/srcpkgs/ibus/template @@ -1,11 +1,11 @@ # Template file for 'ibus' pkgname=ibus version=1.5.27 -revision=2 +revision=3 build_style=gnu-configure build_helper="gir" -configure_args="--enable-ui --enable-gtk3 --enable-gtk4 - --enable-memconf --enable-dconf --enable-wayland --enable-xim +configure_args="--enable-ui --enable-gtk3 --enable-gtk4 --enable-xim + --enable-memconf --enable-dconf --enable-wayland --enable-surrounding-text --disable-tests --disable-schemas-compile --disable-systemd-services --with-python=/usr/bin/python3 --disable-python2 $(vopt_enable dicts emoji-dict) $(vopt_enable dicts unicode-dict) From 9eb907abf92340d6e3719017417c32aca57afde1 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Thu, 16 Feb 2023 01:14:50 -0800 Subject: [PATCH 2/3] mutter: update to 43.3. --- srcpkgs/mutter/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/mutter/template b/srcpkgs/mutter/template index c84c35f12b26..4705d3c72deb 100644 --- a/srcpkgs/mutter/template +++ b/srcpkgs/mutter/template @@ -1,7 +1,7 @@ # Template file for 'mutter' pkgname=mutter -version=43.2 -revision=2 +version=43.3 +revision=1 build_helper="gir" build_style=meson configure_args="-Degl_device=true -Dudev=true -Dnative_backend=true @@ -20,7 +20,7 @@ license="GPL-2.0-or-later" homepage="https://wiki.gnome.org/Projects/Mutter/" changelog="https://gitlab.gnome.org/GNOME/mutter/-/raw/gnome-43/NEWS" distfiles="${GNOME_SITE}/mutter/${version%.*}/mutter-${version}.tar.xz" -checksum=fd2eb707adc333cc277af8685e5cf39135e1c4d798a1f9d05e88e453dc3ebb84 +checksum=67be4820d9b270c9c3c65e38947bf052d2c2ff18ae9e70421d49259efac00a7d shlib_provides="libmutter-clutter-11.so libmutter-cogl-11.so libmutter-cogl-pango-11.so" make_check=no # needs a full graphical session From 53526e1added93a5bd790922be3d8ac53747c38c Mon Sep 17 00:00:00 2001 From: oreo639 Date: Thu, 16 Feb 2023 01:15:07 -0800 Subject: [PATCH 3/3] gnome-shell: update to 43.3. --- srcpkgs/gnome-shell/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gnome-shell/template b/srcpkgs/gnome-shell/template index 6aa67cd1a46b..5089c10c7627 100644 --- a/srcpkgs/gnome-shell/template +++ b/srcpkgs/gnome-shell/template @@ -1,6 +1,6 @@ # Template file for 'gnome-shell' pkgname=gnome-shell -version=43.2 +version=43.3 revision=1 build_style=meson build_helper=gir @@ -21,7 +21,7 @@ license="GPL-2.0-or-later" homepage="https://wiki.gnome.org/Projects/GnomeShell" changelog="https://gitlab.gnome.org/GNOME/gnome-shell/-/raw/gnome-43/NEWS" distfiles="${GNOME_SITE}/gnome-shell/${version%%.*}/gnome-shell-${version}.tar.xz" -checksum=e76fd4be9342410ee9fbdcdd6b2d81c6ff060e7c8cc5a0f1cae6a7aba25d1860 +checksum=49ff8d05f55fa4f1c22f05d0385852ceb429a6b6380c1ba8461e62a46d4c071e do_check() { mkdir /tmp/gnome-shell-xdg