static Lisp_Object xg_default_icon_file;
#endif
+#ifdef HAVE_X_I18N
/* Some functions take this as char *, not const char *. */
static char emacs_class[] = EMACS_CLASS;
+#endif
enum xembed_info
{
unblock_input ();
return GDK_FILTER_REMOVE;
}
+#elif USE_GTK
+ if (dpyinfo && (dpyinfo->prefer_native_input
+ || x_gtk_use_native_input)
+ && (xev->type == KeyPress
+#ifdef HAVE_XINPUT2
+ /* GTK claims cookies for us, so we don't have to claim
+ them here. */
+ || (dpyinfo->supports_xi2
+ && xev->type == GenericEvent
+ && (xev->xgeneric.extension
+ == dpyinfo->xi2_opcode)
+ && (xev->xgeneric.evtype
+ == XI_KeyPress))
+#endif
+ ))
+ {
+ struct frame *f;
+
+#ifdef HAVE_XINPUT2
+ if (xev->type == GenericEvent)
+ f = x_any_window_to_frame (dpyinfo,
+ ((XIDeviceEvent *) xev->xcookie.data)->event);
+ else
+#endif
+ f = x_any_window_to_frame (dpyinfo, xev->xany.window);
+
+ if (f && xg_filter_key (f, xev))
+ {
+ unblock_input ();
+ return GDK_FILTER_REMOVE;
+ }
+ }
#endif
if (! dpyinfo)
goto XI_OTHER;
#endif
+ x_display_set_last_user_time (dpyinfo, xev->time);
+ ignore_next_mouse_click_timeout = 0;
+
+ f = x_any_window_to_frame (dpyinfo, xev->event);
+
XKeyPressedEvent xkey;
memset (&xkey, 0, sizeof xkey);
goto XI_OTHER;
}
#endif
+#elif USE_GTK
+ if ((x_gtk_use_native_input
+ || dpyinfo->prefer_native_input)
+ && xg_filter_key (any, event))
+ {
+ *finish = X_EVENT_DROP;
+ goto XI_OTHER;
+ }
#endif
#ifdef HAVE_XKB
if (keysym == NoSymbol)
goto XI_OTHER;
- x_display_set_last_user_time (dpyinfo, xev->time);
- ignore_next_mouse_click_timeout = 0;
-
- f = x_any_window_to_frame (dpyinfo, xev->event);
-
/* If mouse-highlight is an integer, input clears out
mouse highlighting. */
if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight)
int y, enum text_cursor_kinds cursor_type,
int cursor_width, bool on_p, bool active_p)
{
+#ifdef HAVE_X_I18N
struct frame *f = XFRAME (WINDOW_FRAME (w));
+#endif
if (on_p)
{
#endif
}
+#ifdef HAVE_X_I18N
{
AUTO_STRING (inputStyle, "inputStyle");
AUTO_STRING (InputStyle, "InputStyle");
Lisp_Object value = gui_display_get_resource (dpyinfo, inputStyle, InputStyle,
Qnil, Qnil);
-#ifdef HAVE_X_I18N
if (STRINGP (value))
{
if (!strcmp (SSDATA (value), "callback"))
dpyinfo->prefer_native_input = true;
#endif
}
-#endif
}
+#endif
#ifdef HAVE_X_SM
/* Only do this for the very first display in the Emacs session.