Commit 59e755be authored by Karl Heuer's avatar Karl Heuer
Browse files

(Qvendor_specific_keysyms): New var.

(syms_of_xterm): Initialize and staticpro it.
(x_term_init): Initialize Vsystem_key_alist according to vendor.
parent b9df9faa
...@@ -211,6 +211,8 @@ extern int errno; ...@@ -211,6 +211,8 @@ extern int errno;
/* A mask of extra modifier bits to put into every keyboard char. */ /* A mask of extra modifier bits to put into every keyboard char. */
extern int extra_keyboard_modifiers; extern int extra_keyboard_modifiers;
static Lisp_Object Qvendor_specific_keysyms;
extern XrmDatabase x_load_resources (); extern XrmDatabase x_load_resources ();
void x_delete_display (); void x_delete_display ();
...@@ -5624,9 +5626,14 @@ x_term_init (display_name, xrm_option, resource_name) ...@@ -5624,9 +5626,14 @@ x_term_init (display_name, xrm_option, resource_name)
{ {
dpyinfo->kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); dpyinfo->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (dpyinfo->kboard); init_kboard (dpyinfo->kboard);
/* Change this after lisp/term/x-win.el is prepared to initialize if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound))
this var in a server-dependent manner. */ {
dpyinfo->kboard->Vsystem_key_alist = initial_kboard->Vsystem_key_alist; char *vendor = ServerVendor (dpy);
dpyinfo->kboard->Vsystem_key_alist
= call1 (Qvendor_specific_keysyms,
build_string (vendor ? vendor : ""));
}
dpyinfo->kboard->next_kboard = all_kboards; dpyinfo->kboard->next_kboard = all_kboards;
all_kboards = dpyinfo->kboard; all_kboards = dpyinfo->kboard;
/* Don't let the initial kboard remain current longer than necessary. /* Don't let the initial kboard remain current longer than necessary.
...@@ -5896,5 +5903,8 @@ syms_of_xterm () ...@@ -5896,5 +5903,8 @@ syms_of_xterm ()
staticpro (&last_mouse_scroll_bar); staticpro (&last_mouse_scroll_bar);
last_mouse_scroll_bar = Qnil; last_mouse_scroll_bar = Qnil;
staticpro (&Qvendor_specific_keysyms);
Qvendor_specific_keysyms = intern ("vendor-specific-keysyms");
} }
#endif /* ! defined (HAVE_X_WINDOWS) */ #endif /* ! defined (HAVE_X_WINDOWS) */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment