History

merge

cinap_lenrek committed 10 years ago

Commit efa00ae2 parents b86ca0b eb34f4d1 file · +21 −9Browse files

Unified · Split

gui-x11/x11.c+21−9
@@ -302,6 +302,9 @@ xproc(void *arg) · 301 unmodified lines
302302 Button4MotionMask|
303303 Button5MotionMask|
304304 ExposureMask|
305+ EnterWindowMask|
306+ LeaveWindowMask|
307+ FocusChangeMask|
305308 StructureNotifyMask;
306309
307310 XSelectInput(xkmcon, xdrawable, mask);
@@ -727,15 +730,25 @@ xexpose(XEvent *e) · 419 unmodified lines
727730 static void
728731 xkeyboard(XEvent *e)
729732 {
733+ static int altdown;
730734 KeySym k;
731735
732− /*
733− * I tried using XtGetActionKeysym, but it didn't seem to
734− * do case conversion properly
735− * (at least, with Xterminal servers and R4 intrinsics)
736− */
737− if(e->xany.type != KeyPress && e->xany.type != KeyRelease)
736+ switch(e->xany.type){
737+ case KeyPress:
738+ case KeyRelease:
739+ break;
740+ case FocusIn:
741+ case FocusOut:
742+ if(altdown){
743+ altdown = 0;
744+ kbdkey(Kalt, 0);
745+ kbdkey(Kalt, 1);
746+ kbdkey(Kalt, 0);
747+ }
748+ /* wet floor */
749+ default:
738750 return;
751+ }
739752
740753 XLookupString((XKeyEvent*)e, NULL, 0, &k, NULL);
741754
@@ -866,10 +879,9 @@ xkeyboard(XEvent *e) · 124 unmodified lines
866879 /* Do control mapping ourselves if translator doesn't */
867880 if(e->xkey.state&ControlMask && k != Kalt && k != Kctl)
868881 k &= 0x9f;
869− if(k == NoSymbol) {
882+ if(k == NoSymbol)
870883 return;
871− }
872−
884+ altdown = e->xany.type == KeyPress && k == Kalt;
873885 kbdkey(k, e->xany.type == KeyPress);
874886 }
875887

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t