[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6b82958b9f 2/2: Fix various builds
From: |
Po Lu |
Subject: |
master 6b82958b9f 2/2: Fix various builds |
Date: |
Wed, 19 Oct 2022 09:33:31 -0400 (EDT) |
branch: master
commit 6b82958b9fad5fcf784cf93e44dc118cf554d927
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix various builds
* src/xterm.c (x_handle_selection_monitor_event): Adjust for
build without XInput2.
(x_maybe_clear_preedit, xim_destroy_callback): Make conditional
on Release 6 XIM.
(x_get_keyboard_modifiers): Adjust for build without XCB.
---
src/xterm.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/xterm.c b/src/xterm.c
index 04247bc302..ade5600f4d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -17857,7 +17857,7 @@ x_handle_wm_state (struct frame *f, struct input_event
*ie)
static bool
x_handle_selection_monitor_event (struct x_display_info *dpyinfo,
- XEvent *event)
+ const XEvent *event)
{
XFixesSelectionNotifyEvent *notify;
int i;
@@ -25698,6 +25698,14 @@ x_new_font (struct frame *f, Lisp_Object font_object,
int fontset)
#ifdef HAVE_X11R6
+/* HAVE_X11R6 means Xlib conforms to the R6 specification or later.
+ HAVE_X11R6_XIM, OTOH, means that Emacs should try to use R6-style
+ callback driven input method initialization. They are separate
+ because Sun apparently ships buggy Xlib with some versions of
+ Solaris... */
+
+#ifdef HAVE_X11R6_XIM
+
/* If preedit text is set on F, cancel preedit, free the text, and
generate the appropriate events to cancel the preedit display.
@@ -25763,6 +25771,8 @@ xim_destroy_callback (XIM xim, XPointer client_data,
XPointer call_data)
unblock_input ();
}
+#endif
+
#endif /* HAVE_X11R6 */
/* Open the connection to the XIM server on display DPYINFO.
@@ -30512,8 +30522,14 @@ x_get_keyboard_modifiers (struct x_display_info
*dpyinfo)
/* This sometimes happens when the function is called during display
initialization, which can happen while obtaining vendor specific
keysyms. */
+
+#ifdef HAVE_XKB
if (!dpyinfo->xkb_desc && !dpyinfo->modmap)
x_find_modifier_meanings (dpyinfo);
+#else
+ if (!dpyinfo->modmap)
+ x_find_modifier_meanings (dpyinfo);
+#endif
return list5 (make_uint (dpyinfo->hyper_mod_mask),
make_uint (dpyinfo->super_mod_mask),