Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
f149e362
Unverified
Commit
f149e362
authored
May 04, 2017
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-pr/fix_keyboard_delay' into 3.6.x
Attributes GH PR #452:
https://github.com/ArcticaProject/nx-libs/pull/452
parents
60d7c02e
651d5e5e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
26 deletions
+8
-26
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+4
-17
Keystroke.c
nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+4
-9
No files found.
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
f149e362
...
...
@@ -934,7 +934,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
{
enum
HandleEventResult
result
;
XlibKeySym
*
keysym
;
KeySym
keysym
;
#ifdef TEST
fprintf
(
stderr
,
"nxagentDispatchEvents: Going to handle new KeyPress event.
\n
"
);
...
...
@@ -1101,17 +1101,12 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
* sive delay.
*/
int
keysyms_per_keycode_return
;
keysym
=
XGetKeyboardMapping
(
nxagentDisplay
,
X
.
xkey
.
keycode
,
1
,
&
keysyms_per_keycode_return
);
keysym
=
XKeycodeToKeysym
(
nxagentDisplay
,
X
.
xkey
.
keycode
,
0
);
if
(
nxagentMonitoredDuplicate
(
keysym
[
0
]
)
==
1
)
if
(
nxagentMonitoredDuplicate
(
keysym
)
==
1
)
{
nxagentRemoveDuplicatedKeys
(
&
X
);
}
free
(
keysym
);
if
(
nxagentOption
(
ViewOnly
)
==
0
&&
nxagentOption
(
Shadow
)
==
1
&&
result
==
doNothing
)
{
...
...
@@ -4657,16 +4652,8 @@ void nxagentDumpInputDevicesState(void)
{
if
(
val
&
(
mask
<<
k
))
{
int
keysyms_per_keycode_return
;
XlibKeySym
*
keysym
=
XGetKeyboardMapping
(
nxagentDisplay
,
i
*
8
+
k
,
1
,
&
keysyms_per_keycode_return
);
fprintf
(
stderr
,
"
\n\t
[%d] [%s]"
,
i
*
8
+
k
,
XKeysymToString
(
keysym
[
0
]));
free
(
keysym
);
XKeysymToString
(
XKeycodeToKeysym
(
nxagentDisplay
,
i
*
8
+
k
,
0
)));
}
}
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
View file @
f149e362
...
...
@@ -480,30 +480,25 @@ void nxagentDumpKeystrokes(void)
static
enum
nxagentSpecialKeystroke
find_keystroke
(
XKeyEvent
*
X
)
{
enum
nxagentSpecialKeystroke
ret
=
KEYSTROKE_NOTHING
;
int
keysyms_per_keycode_return
;
XlibKeySym
*
keysym
=
XGetKeyboardMapping
(
nxagentDisplay
,
X
->
keycode
,
1
,
&
keysyms_per_keycode_return
);
KeySym
keysym
=
XKeycodeToKeysym
(
nxagentDisplay
,
X
->
keycode
,
0
);
#ifdef DEBUG
fprintf
(
stderr
,
"%s: got keysym '%c' (%d)
\n
"
,
__func__
,
keysym
[
0
],
keysym
[
0
]
);
fprintf
(
stderr
,
"%s: got keysym '%c' (%d)
\n
"
,
__func__
,
keysym
,
keysym
);
#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
);
#endif
if
(
cur
->
keysym
==
keysym
[
0
]
&&
modifier_matches
(
cur
->
modifierMask
,
cur
->
modifierAltMeta
,
X
->
state
))
{
if
(
cur
->
keysym
==
keysym
&&
modifier_matches
(
cur
->
modifierMask
,
cur
->
modifierAltMeta
,
X
->
state
))
{
#ifdef DEBUG
fprintf
(
stderr
,
"%s: match including modifiers for keysym '%c' (%d), stroke %d (%s)
\n
"
,
__func__
,
cur
->
keysym
,
cur
->
keysym
,
cur
->
stroke
,
nxagentSpecialKeystrokeNames
[
cur
->
stroke
]);
#endif
free
(
keysym
);
return
cur
->
stroke
;
}
}
free
(
keysym
);
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment