diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-08-27 14:11:53 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-08-27 14:11:53 +0200 |
commit | 6bca289afd17db8e1faf3db884153a6cad40283f (patch) | |
tree | 0a78eff800b566497b0de09101a959c5f4abd977 /nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | |
parent | daa50fd80ed5f777754a51c0e2b4869ba083a337 (diff) | |
parent | 6181aa9113cc1e852d405ef85c184e32e7fad6c4 (diff) | |
download | nx-libs-6bca289afd17db8e1faf3db884153a6cad40283f.tar.gz nx-libs-6bca289afd17db8e1faf3db884153a6cad40283f.tar.bz2 nx-libs-6bca289afd17db8e1faf3db884153a6cad40283f.zip |
Merge branch 'uli42-gh-sunweaver/pr/autograb-without-inputlock' into 3.6.x
Attributes GH PR #835: https://github.com/ArcticaProject/nx-libs/pull/835
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keystroke.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index fe7e10d82..fb2979a1f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -99,6 +99,9 @@ char * nxagentSpecialKeystrokeNames[] = { "viewport_scroll_down", "reread_keystrokes", + + "autograb", + NULL, }; @@ -138,6 +141,7 @@ struct nxagentSpecialKeystrokeMap default_map[] = { {KEYSTROKE_VIEWPORT_SCROLL_DOWN, ControlMask, True, XK_Down}, {KEYSTROKE_VIEWPORT_SCROLL_DOWN, ControlMask, True, XK_KP_Down}, {KEYSTROKE_REREAD_KEYSTROKES, ControlMask, True, XK_k}, + {KEYSTROKE_AUTOGRAB, ControlMask, True, XK_g}, {KEYSTROKE_END_MARKER, 0, False, NoSymbol}, }; struct nxagentSpecialKeystrokeMap *map = default_map; @@ -467,7 +471,7 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) #endif for (struct nxagentSpecialKeystrokeMap *cur = map; cur->stroke != KEYSTROKE_END_MARKER; cur++) { #ifdef DEBUG - fprintf(stderr, "%s: checking keysym '%c' (%d)\n", __func__, cur->keysym, cur->keysym); + fprintf(stderr,"%s: keysym %d stroke %d, type %d\n", __func__, cur->keysym, cur->stroke, X->type); #endif if (cur->keysym == keysym && modifier_matches(cur->modifierMask, cur->modifierAltMeta, X->state)) { #ifdef DEBUG @@ -627,6 +631,9 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) if (X->type == KeyRelease) nxagentInitKeystrokes(True); break; + case KEYSTROKE_AUTOGRAB: + *result = doAutoGrab; + break; case KEYSTROKE_NOTHING: /* do nothing. difference to KEYSTROKE_IGNORE is the return value */ case KEYSTROKE_END_MARKER: /* just to make gcc STFU */ case KEYSTROKE_MAX: |