summarylogtreecommitdiffstats
path: root/mr3751.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mr3751.patch')
-rw-r--r--mr3751.patch80
1 files changed, 26 insertions, 54 deletions
diff --git a/mr3751.patch b/mr3751.patch
index 5b4706a90ffa..65c09db32451 100644
--- a/mr3751.patch
+++ b/mr3751.patch
@@ -1,36 +1,7 @@
-From e12da9d8a8f747a7eeebfc9e399cd6f664d6abf3 Mon Sep 17 00:00:00 2001
-From: Alynx Zhou <alynx.zhou@gmail.com>
-Date: Wed, 15 May 2024 00:05:55 +0800
-Subject: [PATCH 1/2] wayland/text-input: Remove unused repeated code
-
-Maybe they are generated by copy during refactor.
----
- src/wayland/meta-wayland-text-input.c | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/src/wayland/meta-wayland-text-input.c b/src/wayland/meta-wayland-text-input.c
-index 04ee51dbaa5..6ae226131c4 100644
---- a/src/wayland/meta-wayland-text-input.c
-+++ b/src/wayland/meta-wayland-text-input.c
-@@ -302,9 +302,6 @@ meta_wayland_text_input_focus_set_preedit_text (ClutterInputFocus *focus,
-
- text_input = META_WAYLAND_TEXT_INPUT_FOCUS (focus)->text_input;
-
-- if (text)
-- pos = g_utf8_offset_to_pointer (text, cursor) - text;
--
- g_clear_pointer (&text_input->preedit.string, g_free);
- text_input->preedit.string = g_strdup (text);
-
---
-GitLab
-
-
-From 6b9bbebbdc3a8b35f898a269227f36a36590359e Mon Sep 17 00:00:00 2001
+From 033b1b83a8484247519bc98eee70add380d1e3fc Mon Sep 17 00:00:00 2001
From: Alynx Zhou <alynx.zhou@gmail.com>
Date: Wed, 15 May 2024 00:07:41 +0800
-Subject: [PATCH 2/2] wayland/text-input-v1: Implement basic text-input-v1
- support
+Subject: [PATCH] wayland/text-input-v1: Implement basic text-input-v1 support
This commit makes input methods work in text-input-v1 only clients
(mostly Chromium/Electron based apps with Ozone Wayland), which is
@@ -38,6 +9,8 @@ needed by users who needs IME to input their languages, like Chinese,
Japanese or Korean.
Closes <https://gitlab.gnome.org/GNOME/mutter/-/issues/3200>.
+
+Signed-off-by: Mingi Sung <sungmg@saltyming.net>
---
clutter/clutter/clutter-enums.h | 3 +
src/core/events.c | 11 +-
@@ -54,7 +27,7 @@ Closes <https://gitlab.gnome.org/GNOME/mutter/-/issues/3200>.
create mode 100644 src/wayland/meta-wayland-text-input-v1.h
diff --git a/clutter/clutter/clutter-enums.h b/clutter/clutter/clutter-enums.h
-index 45956bf57b2..8198e73516f 100644
+index 45956bf57..8198e7351 100644
--- a/clutter/clutter/clutter-enums.h
+++ b/clutter/clutter/clutter-enums.h
@@ -1183,6 +1183,9 @@ typedef enum
@@ -68,7 +41,7 @@ index 45956bf57b2..8198e73516f 100644
typedef enum
diff --git a/src/core/events.c b/src/core/events.c
-index 4261bfb98a8..35b94e18768 100644
+index 1f36d2feb..a1874d673 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -238,6 +238,7 @@ meta_display_handle_event (MetaDisplay *display,
@@ -88,15 +61,14 @@ index 4261bfb98a8..35b94e18768 100644
}
#endif
-@@ -287,10 +290,12 @@ meta_display_handle_event (MetaDisplay *display,
+@@ -287,9 +290,11 @@ meta_display_handle_event (MetaDisplay *display,
}
#ifdef HAVE_WAYLAND
- if (wayland_text_input &&
-- !has_grab &&
-+ if (!has_grab &&
- !meta_compositor_get_current_window_drag (compositor) &&
+- !meta_compositor_get_current_window_drag (compositor) &&
- meta_wayland_text_input_update (wayland_text_input, event))
++ if (!meta_compositor_get_current_window_drag (compositor) &&
+ ((wayland_text_input &&
+ meta_wayland_text_input_update (wayland_text_input, event)) ||
+ (wayland_text_input_v1 &&
@@ -105,10 +77,10 @@ index 4261bfb98a8..35b94e18768 100644
if (wayland_compositor)
diff --git a/src/meson.build b/src/meson.build
-index 3060b28802b..12a249c540e 100644
+index 05df3bfd2..fad08706a 100644
--- a/src/meson.build
+++ b/src/meson.build
-@@ -687,6 +687,8 @@ if have_wayland
+@@ -688,6 +688,8 @@ if have_wayland
'wayland/meta-wayland-tablet-tool.h',
'wayland/meta-wayland-text-input.c',
'wayland/meta-wayland-text-input.h',
@@ -117,7 +89,7 @@ index 3060b28802b..12a249c540e 100644
'wayland/meta-wayland-touch.c',
'wayland/meta-wayland-touch.h',
'wayland/meta-wayland-transaction.c',
-@@ -1075,6 +1077,7 @@ if have_wayland
+@@ -1076,6 +1078,7 @@ if have_wayland
['single-pixel-buffer', 'staging', 'v1', ],
['tablet', 'unstable', 'v2', ],
['text-input', 'unstable', 'v3', ],
@@ -126,18 +98,18 @@ index 3060b28802b..12a249c540e 100644
['xdg-activation', 'staging', 'v1', ],
['xdg-foreign', 'unstable', 'v1', ],
diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c
-index f8d58a61252..fca0b346db7 100644
+index 2301e0068..d0f888084 100644
--- a/src/wayland/meta-wayland-seat.c
+++ b/src/wayland/meta-wayland-seat.c
-@@ -228,6 +228,7 @@ default_focus (MetaWaylandEventHandler *handler,
- meta_wayland_data_device_primary_sync_focus (&seat->primary_data_device);
+@@ -229,6 +229,7 @@ default_focus (MetaWaylandEventHandler *handler,
+ surface);
meta_wayland_tablet_seat_set_pad_focus (seat->tablet_seat, surface);
meta_wayland_text_input_set_focus (seat->text_input, surface);
+ /* text-input-v1 will set focused surface on activate. */
}
if (caps & CLUTTER_INPUT_CAPABILITY_TABLET_TOOL)
-@@ -289,6 +290,8 @@ meta_wayland_seat_new (MetaWaylandCompositor *compositor,
+@@ -290,6 +291,8 @@ meta_wayland_seat_new (MetaWaylandCompositor *compositor,
NULL);
seat->text_input = meta_wayland_text_input_new (seat);
@@ -146,7 +118,7 @@ index f8d58a61252..fca0b346db7 100644
meta_wayland_data_device_init (&seat->data_device, seat);
meta_wayland_data_device_primary_init (&seat->primary_data_device, seat);
-@@ -337,6 +340,7 @@ meta_wayland_seat_free (MetaWaylandSeat *seat)
+@@ -338,6 +341,7 @@ meta_wayland_seat_free (MetaWaylandSeat *seat)
g_object_unref (seat->touch);
meta_wayland_text_input_destroy (seat->text_input);
@@ -154,7 +126,7 @@ index f8d58a61252..fca0b346db7 100644
g_free (seat);
}
-@@ -477,7 +481,10 @@ meta_wayland_seat_handle_event_internal (MetaWaylandSeat *seat,
+@@ -478,7 +482,10 @@ meta_wayland_seat_handle_event_internal (MetaWaylandSeat *seat,
if (event_type == CLUTTER_BUTTON_PRESS ||
event_type == CLUTTER_TOUCH_BEGIN)
{
@@ -166,7 +138,7 @@ index f8d58a61252..fca0b346db7 100644
}
switch (event_type)
-@@ -509,7 +516,8 @@ meta_wayland_seat_handle_event_internal (MetaWaylandSeat *seat,
+@@ -510,7 +517,8 @@ meta_wayland_seat_handle_event_internal (MetaWaylandSeat *seat,
case CLUTTER_IM_COMMIT:
case CLUTTER_IM_DELETE:
case CLUTTER_IM_PREEDIT:
@@ -177,7 +149,7 @@ index f8d58a61252..fca0b346db7 100644
break;
diff --git a/src/wayland/meta-wayland-seat.h b/src/wayland/meta-wayland-seat.h
-index 169a92e4e17..10633b02947 100644
+index 83fd7de1e..37704cf5a 100644
--- a/src/wayland/meta-wayland-seat.h
+++ b/src/wayland/meta-wayland-seat.h
@@ -30,6 +30,7 @@
@@ -198,7 +170,7 @@ index 169a92e4e17..10633b02947 100644
MetaWaylandEventHandler *default_handler;
diff --git a/src/wayland/meta-wayland-text-input-v1.c b/src/wayland/meta-wayland-text-input-v1.c
new file mode 100644
-index 00000000000..1826a4ff43e
+index 000000000..1826a4ff4
--- /dev/null
+++ b/src/wayland/meta-wayland-text-input-v1.c
@@ -0,0 +1,859 @@
@@ -1063,7 +1035,7 @@ index 00000000000..1826a4ff43e
+}
diff --git a/src/wayland/meta-wayland-text-input-v1.h b/src/wayland/meta-wayland-text-input-v1.h
new file mode 100644
-index 00000000000..79b1c0a5413
+index 000000000..79b1c0a54
--- /dev/null
+++ b/src/wayland/meta-wayland-text-input-v1.h
@@ -0,0 +1,38 @@
@@ -1106,7 +1078,7 @@ index 00000000000..79b1c0a5413
+gboolean meta_wayland_text_input_v1_handle_event (MetaWaylandTextInputV1 *text_input,
+ const ClutterEvent *event);
diff --git a/src/wayland/meta-wayland-versions.h b/src/wayland/meta-wayland-versions.h
-index 900f30d7888..a77b81461b7 100644
+index 900f30d78..a77b81461 100644
--- a/src/wayland/meta-wayland-versions.h
+++ b/src/wayland/meta-wayland-versions.h
@@ -49,6 +49,7 @@
@@ -1118,7 +1090,7 @@ index 900f30d7888..a77b81461b7 100644
#define META_ZWP_PRIMARY_SELECTION_V1_VERSION 1
#define META_WP_PRESENTATION_VERSION 1
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
-index 501b69a91c0..0114823c145 100644
+index 501b69a91..0114823c1 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -865,6 +865,7 @@ meta_wayland_compositor_new (MetaContext *context)
@@ -1143,7 +1115,7 @@ index 501b69a91c0..0114823c145 100644
meta_wayland_compositor_update_focus (MetaWaylandCompositor *compositor,
MetaWindow *window)
diff --git a/src/wayland/meta-wayland.h b/src/wayland/meta-wayland.h
-index 0a0476eba0b..c23e82cdcae 100644
+index 0a0476eba..c23e82cdc 100644
--- a/src/wayland/meta-wayland.h
+++ b/src/wayland/meta-wayland.h
@@ -26,6 +26,7 @@
@@ -1163,5 +1135,5 @@ index 0a0476eba0b..c23e82cdcae 100644
#ifdef HAVE_XWAYLAND
void meta_wayland_compositor_notify_surface_id (MetaWaylandCompositor *compositor,
--
-GitLab
+2.45.2