Mercurial > hg > xemacs-beta
comparison src/event-Xt.c @ 5557:53c066311921
If XLookupKeysym() returned an XFree86 "special key", ignore it. Fixes Sh-F11.
src/ChangeLog addition:
2011-08-27 Aidan Kehoe <kehoea@parhasard.net>
* config.h.in: Make HAVE_X11_XF86KEYSYM_H available here.
* event-Xt.c: #include X11/XF86keysym.h if available.
* event-Xt.c (x_event_to_emacs_event):
If XLookupKeysym () returned one of the XFree86 "special action
keys" for the shifted keysym, treat that as NoSymbol, fixing a
long-standing bug with shifted function keys under X.org.
Details of why in:
http://mid.gmane.org/16960.15685.26911.644835@parhasard.net
ChangeLog addition:
2011-08-27 Aidan Kehoe <kehoea@parhasard.net>
* configure.ac: Check whether X11/XF86keysym.h is available, to
allow us to avoid a bug in the interaction of XKB and XLookupKeysym.
* configure: Regenerate.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 27 Aug 2011 20:35:23 +0100 |
parents | 308d34e9f07d |
children | 10455659ab64 |
comparison
equal
deleted
inserted
replaced
5556:a142ad1a9140 | 5557:53c066311921 |
---|---|
62 use XtGetValues(), but ... */ | 62 use XtGetValues(), but ... */ |
63 #include <X11/ShellP.h> | 63 #include <X11/ShellP.h> |
64 | 64 |
65 #if defined (HAVE_XIM) && defined (XIM_MOTIF) | 65 #if defined (HAVE_XIM) && defined (XIM_MOTIF) |
66 #include "xmotif.h" | 66 #include "xmotif.h" |
67 #endif | |
68 | |
69 #ifdef HAVE_X11_XF86KEYSYM_H | |
70 #include <X11/XF86keysym.h> | |
67 #endif | 71 #endif |
68 | 72 |
69 #ifdef HAVE_DRAGNDROP | 73 #ifdef HAVE_DRAGNDROP |
70 #include "dragdrop.h" | 74 #include "dragdrop.h" |
71 #endif | 75 #endif |
1228 if (modifiers & XEMACS_MOD_SHIFT) | 1232 if (modifiers & XEMACS_MOD_SHIFT) |
1229 { | 1233 { |
1230 int Mode_switch_p = *state & xd->ModeMask; | 1234 int Mode_switch_p = *state & xd->ModeMask; |
1231 KeySym bot = XLookupKeysym (ev, Mode_switch_p ? 2 : 0); | 1235 KeySym bot = XLookupKeysym (ev, Mode_switch_p ? 2 : 0); |
1232 KeySym top = XLookupKeysym (ev, Mode_switch_p ? 3 : 1); | 1236 KeySym top = XLookupKeysym (ev, Mode_switch_p ? 3 : 1); |
1237 | |
1238 #ifdef HAVE_X11_XF86KEYSYM_H | |
1239 /* XLookupKeysm() and XLookupString() differ for these | |
1240 keysyms under X.org. The latter treats them as not | |
1241 visible to X11 apps (so if the event has the shift | |
1242 modifer, the keysym of the unshifted key will be | |
1243 returned) while the former treats them as visible. We | |
1244 chose to follow XLookupString in x_to_emacs_keysym(), so | |
1245 we need to do that here, too. */ | |
1246 | |
1247 if (XF86XK_Switch_VT_1 <= top && top <= XF86XK_Prev_VMode) | |
1248 { | |
1249 top = NoSymbol; | |
1250 } | |
1251 #endif | |
1233 if (top && bot && top != bot) | 1252 if (top && bot && top != bot) |
1234 modifiers &= ~XEMACS_MOD_SHIFT; | 1253 modifiers &= ~XEMACS_MOD_SHIFT; |
1235 } | 1254 } |
1236 set_event_type (emacs_event, key_press_event); | 1255 set_event_type (emacs_event, key_press_event); |
1237 SET_EVENT_TIMESTAMP (emacs_event, ev->time); | 1256 SET_EVENT_TIMESTAMP (emacs_event, ev->time); |