diff options
author | Po Lu <luangruo@yahoo.com> | 2022-01-08 15:21:51 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-01-08 15:21:51 +0800 |
commit | d76fb0c11e9859db0d03d6496f5a720d304f4ca9 (patch) | |
tree | 89035fe1de1c0835716c45c9747e74128308e039 /src/gtkutil.h | |
parent | 63c83e40dad88036d5ceef17eace51056a18b55f (diff) | |
download | emacs-d76fb0c11e9859db0d03d6496f5a720d304f4ca9.tar.gz emacs-d76fb0c11e9859db0d03d6496f5a720d304f4ca9.tar.bz2 emacs-d76fb0c11e9859db0d03d6496f5a720d304f4ca9.zip |
Allow using GTK+ to handle input methods on X
* doc/emacs/xresources.texi (Table of Resources): Document new
value of `inputStyle'.
* etc/NEWS: Announce new option.
* lisp/cus-start.el (standard): Add `x-gtk-use-native-input'.
* src/gtkutil.c (xg_mark_data): Mark xg_pending_quit_event.
(xg_add_virtual_mods):
(xg_im_context_commit):
(xg_im_context_preedit_changed):
(xg_im_context_preedit_end):
(xg_widget_key_press_event_cb):
(xg_filter_key): New functions.
* src/gtkutil.h: Add prototype for `xg_filter_key'.
* src/xfns.c (xic_set_preeditarea): Set cursor location for the
GTK IM context as well.
* src/xterm.c (xg_pending_quit_event): New variable.
(x_focus_changed): Set focus on the GTK input context as well.
(x_filter_event): Filter events through GTK if the user asked
for it.
(handle_one_xevent): Likewise.
(XTread_socket): Set hold_quit to xg_pending_quit_event if it
exists.
(x_draw_window_cursor): Always set preedit area even if XIC
doesn't exist.
* src/xterm.h (struct x_display_info): New field
`prefer_native_input'.
(struct x_output): New field `im_context'.
Diffstat (limited to 'src/gtkutil.h')
-rw-r--r-- | src/gtkutil.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gtkutil.h b/src/gtkutil.h index 5a918259280..a1dd281f1d3 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h @@ -217,6 +217,8 @@ extern void xg_print_frames_dialog (Lisp_Object); extern bool xg_is_menu_window (Display *dpy, Window); #endif +extern bool xg_filter_key (struct frame *frame, XEvent *xkey); + /* Mark all callback data that are Lisp_object:s during GC. */ extern void xg_mark_data (void); |