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
05e03b96
Commit
05e03b96
authored
Jul 16, 2018
by
Ulrich Sibiller
Committed by
Mike Gabriel
Nov 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keyboard.c: greatly simplify the code in nxagentKeyboardProc
most of the code was existing twice
parent
d8bbbcf2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
31 deletions
+13
-31
Keyboard.c
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+13
-31
No files found.
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
View file @
05e03b96
...
...
@@ -828,39 +828,16 @@ XkbError:
nxagentKeycodeConversionSetup
();
if
(
xkb
==
NULL
||
xkb
->
geom
==
NULL
)
if
(
xkb
&&
xkb
->
geom
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentKeyboardProc: No current keyboard.
\n
"
);
if
(
xkb
==
NULL
)
{
fprintf
(
stderr
,
"nxagentKeyboardProc: xkb is null.
\n
"
);
}
else
{
fprintf
(
stderr
,
"nxagentKeyboardProc: xkb->geom is null.
\n
"
);
}
fprintf
(
stderr
,
"nxagentKeyboardProc: Going to set rules and init device.
\n
"
);
#endif
#ifdef DEBUG
fprintf
(
stderr
,
"nxagentKeyboardProc: Going to set rules and init device: "
"[rules='%s',model='%s',layout='%s',variants='%s',options='%s'].
\n
"
,
rules
,
model
,
layout
,
variants
,
options
);
#endif
XkbSetRulesDflts
(
rules
,
model
,
layout
,
variants
,
options
);
XkbInitKeyboardDeviceStruct
((
void
*
)
pDev
,
&
names
,
&
keySyms
,
modmap
,
nxagentBell
,
nxagentChangeKeyboardControl
);
if
(
!
nxagentKeyboard
||
strcmp
(
nxagentKeyboard
,
"query"
)
==
0
)
{
goto
XkbError
;
}
goto
XkbEnd
;
XkbGetControls
(
nxagentDisplay
,
XkbAllControlsMask
,
xkb
);
}
XkbGetControls
(
nxagentDisplay
,
XkbAllControlsMask
,
xkb
);
#ifdef TEST
else
{
fprintf
(
stderr
,
"nxagentKeyboardProc: No current keyboard.
\n
"
);
}
#endif
#ifdef DEBUG
fprintf
(
stderr
,
"nxagentKeyboardProc: Going to set rules and init device: "
...
...
@@ -877,6 +854,11 @@ XkbError:
goto
XkbError
;
}
if
(
xkb
&&
xkb
->
geom
)
{
XkbDDXChangeControls
(
pDev
,
xkb
->
ctrls
,
xkb
->
ctrls
);
}
if
(
nxagentOption
(
Shadow
)
==
1
&&
pDev
&&
pDev
->
key
)
{
NXShadowInitKeymap
(
&
(
pDev
->
key
->
curKeySyms
));
...
...
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