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
302 Button4MotionMask|302 Button4MotionMask|
303 Button5MotionMask|303 Button5MotionMask|
304 ExposureMask|304 ExposureMask|
305 EnterWindowMask|
306 LeaveWindowMask|
307 FocusChangeMask|
305 StructureNotifyMask;308 StructureNotifyMask;
306 309
307 XSelectInput(xkmcon, xdrawable, mask);310 XSelectInput(xkmcon, xdrawable, mask);
@@ -727,15 +730,25 @@ xexpose(XEvent *e) · 419 unmodified lines
727static void730static void
728xkeyboard(XEvent *e)731xkeyboard(XEvent *e)
729{732{
733 static int altdown;
730 KeySym k;734 KeySym k;
731 735
732 /*736 switch(e->xany.type){
733 * I tried using XtGetActionKeysym, but it didn't seem to737 case KeyPress:
734 * do case conversion properly738 case KeyRelease:
735 * (at least, with Xterminal servers and R4 intrinsics)739 break;
736 */740 case FocusIn:
737 if(e->xany.type != KeyPress && e->xany.type != KeyRelease)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:
738 return;750 return;
751 }
739 752
740 XLookupString((XKeyEvent*)e, NULL, 0, &k, NULL);753 XLookupString((XKeyEvent*)e, NULL, 0, &k, NULL);
741 754
@@ -866,10 +879,9 @@ xkeyboard(XEvent *e) · 124 unmodified lines
866 /* Do control mapping ourselves if translator doesn't */879 /* Do control mapping ourselves if translator doesn't */
867 if(e->xkey.state&ControlMask && k != Kalt && k != Kctl)880 if(e->xkey.state&ControlMask && k != Kalt && k != Kctl)
868 k &= 0x9f;881 k &= 0x9f;
869 if(k == NoSymbol) {882 if(k == NoSymbol)
870 return;883 return;
871 }884 altdown = e->xany.type == KeyPress && k == Kalt;
872
873 kbdkey(k, e->xany.type == KeyPress);885 kbdkey(k, e->xany.type == KeyPress);
874}886}
875 887

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