[mutter/wip/carlosg/im-update-preedit-with-mode: 1/4] clutter: Handle touch down and button press events in ClutterInputFocus
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/im-update-preedit-with-mode: 1/4] clutter: Handle touch down and button press events in ClutterInputFocus
- Date: Mon, 2 Aug 2021 14:03:57 +0000 (UTC)
commit 7e0a2e31ad05f4b7fb603b7488fff47e6e6d7df7
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jul 27 16:45:14 2021 +0200
clutter: Handle touch down and button press events in ClutterInputFocus
In line with GTK, the input method context should be reset when clicks
are handled by the ClutterInputFocus user. The reset action can then
either clear or commit the preedit text, as configured by the IM module.
clutter/clutter/clutter-input-focus.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/clutter/clutter/clutter-input-focus.c b/clutter/clutter/clutter-input-focus.c
index 2aea51e24d..b54e64aa30 100644
--- a/clutter/clutter/clutter-input-focus.c
+++ b/clutter/clutter/clutter-input-focus.c
@@ -179,6 +179,14 @@ clutter_input_focus_filter_event (ClutterInputFocus *focus,
event->im.offset);
return TRUE;
}
+ else if (event->type == CLUTTER_TOUCH_BEGIN ||
+ (event->type == CLUTTER_BUTTON_PRESS &&
+ event->button.button == CLUTTER_BUTTON_PRIMARY))
+ {
+ clutter_input_focus_reset (focus);
+ /* pointing events are not consumed by IMs */
+ return FALSE;
+ }
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]