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
34e9c6b0
Commit
34e9c6b0
authored
Apr 30, 2019
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keyboard.c: clean/unify formatting
parent
0a211b6b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
Keyboard.c
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+14
-8
No files found.
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
View file @
34e9c6b0
...
@@ -647,14 +647,15 @@ N/A
...
@@ -647,14 +647,15 @@ N/A
if
(
keymap64
==
NULL
)
if
(
keymap64
==
NULL
)
{
{
XFreeModifiermap
(
modifier_keymap
);
XFreeModifiermap
(
modifier_keymap
);
return
-
1
;
return
-
1
;
}
}
len
=
(
max_keycode
-
min_keycode
+
1
)
*
mapWidth
;
len
=
(
max_keycode
-
min_keycode
+
1
)
*
mapWidth
;
keymap
=
(
KeySym
*
)
malloc
(
len
*
sizeof
(
KeySym
));
keymap
=
(
KeySym
*
)
malloc
(
len
*
sizeof
(
KeySym
));
for
(
i
=
0
;
i
<
len
;
++
i
)
for
(
i
=
0
;
i
<
len
;
++
i
)
{
keymap
[
i
]
=
keymap64
[
i
];
keymap
[
i
]
=
keymap64
[
i
];
}
XFree
(
keymap64
);
XFree
(
keymap64
);
}
}
...
@@ -668,7 +669,6 @@ N/A
...
@@ -668,7 +669,6 @@ N/A
if
(
keymap
==
NULL
)
if
(
keymap
==
NULL
)
{
{
XFreeModifiermap
(
modifier_keymap
);
XFreeModifiermap
(
modifier_keymap
);
return
-
1
;
return
-
1
;
}
}
...
@@ -682,18 +682,24 @@ N/A
...
@@ -682,18 +682,24 @@ N/A
memset
(
modmap
,
0
,
sizeof
(
modmap
));
memset
(
modmap
,
0
,
sizeof
(
modmap
));
for
(
j
=
0
;
j
<
8
;
j
++
)
for
(
j
=
0
;
j
<
8
;
j
++
)
for
(
i
=
0
;
i
<
modifier_keymap
->
max_keypermod
;
i
++
)
{
{
for
(
i
=
0
;
i
<
modifier_keymap
->
max_keypermod
;
i
++
)
{
CARD8
keycode
;
CARD8
keycode
;
if
((
keycode
=
if
((
keycode
=
modifier_keymap
->
modifier_keymap
->
modifiermap
[
j
*
modifier_keymap
->
max_keypermod
+
i
]))
modifiermap
[
j
*
modifier_keymap
->
max_keypermod
+
i
]))
{
modmap
[
keycode
]
|=
1
<<
j
;
modmap
[
keycode
]
|=
1
<<
j
;
}
if
(
keycode
>
0
)
if
(
keycode
>
0
)
{
{
nxagentCheckModifierMasks
(
keycode
,
j
);
nxagentCheckModifierMasks
(
keycode
,
j
);
}
}
}
}
}
XFreeModifiermap
(
modifier_keymap
);
XFreeModifiermap
(
modifier_keymap
);
modifier_keymap
=
NULL
;
modifier_keymap
=
NULL
;
...
@@ -747,9 +753,6 @@ XkbError:
...
@@ -747,9 +753,6 @@ XkbError:
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentKeyboardProc: Using XKB extension.
\n
"
);
fprintf
(
stderr
,
"nxagentKeyboardProc: Using XKB extension.
\n
"
);
#endif
#ifdef TEST
fprintf
(
stderr
,
"nxagentKeyboardProc: nxagentKeyboard is [%s].
\n
"
,
nxagentKeyboard
?
nxagentKeyboard
:
"NULL"
);
fprintf
(
stderr
,
"nxagentKeyboardProc: nxagentKeyboard is [%s].
\n
"
,
nxagentKeyboard
?
nxagentKeyboard
:
"NULL"
);
#endif
#endif
...
@@ -779,10 +782,9 @@ XkbError:
...
@@ -779,10 +782,9 @@ XkbError:
{
{
for
(
i
=
0
;
nxagentKeyboard
[
i
]
!=
'/'
&&
nxagentKeyboard
[
i
]
!=
0
;
i
++
);
for
(
i
=
0
;
nxagentKeyboard
[
i
]
!=
'/'
&&
nxagentKeyboard
[
i
]
!=
0
;
i
++
);
if
(
nxagentKeyboard
[
i
]
==
0
||
nxagentKeyboard
[
i
+
1
]
==
0
||
i
==
0
)
if
(
nxagentKeyboard
[
i
]
==
0
||
nxagentKeyboard
[
i
+
1
]
==
0
||
i
==
0
)
{
{
ErrorF
(
"Warning: Wrong keyboard type: %s.
\n
"
,
nxagentKeyboard
);
ErrorF
(
"Warning: Wrong keyboard type: %s.
\n
"
,
nxagentKeyboard
);
goto
XkbError
;
goto
XkbError
;
}
}
...
@@ -873,8 +875,10 @@ XkbError:
...
@@ -873,8 +875,10 @@ XkbError:
* instead of a file.
* instead of a file.
*/
*/
if
(
nxagentX2go
==
1
)
if
(
nxagentX2go
==
1
)
{
nxagentWriteKeyboardDir
();
nxagentWriteKeyboardDir
();
}
}
}
else
else
{
{
nxagentKeycodeConversionSetup
();
nxagentKeycodeConversionSetup
();
...
@@ -891,9 +895,11 @@ XkbError:
...
@@ -891,9 +895,11 @@ XkbError:
* we can drop this here.
* we can drop this here.
*/
*/
if
(
nxagentX2go
==
1
)
if
(
nxagentX2go
==
1
)
{
nxagentWriteKeyboardFile
(
nxagentRemoteRules
,
nxagentRemoteModel
,
nxagentRemoteLayout
,
nxagentRemoteVariant
,
nxagentRemoteOptions
);
nxagentWriteKeyboardFile
(
nxagentRemoteRules
,
nxagentRemoteModel
,
nxagentRemoteLayout
,
nxagentRemoteVariant
,
nxagentRemoteOptions
);
}
}
}
}
}
#ifdef DEBUG
#ifdef DEBUG
else
else
{
{
...
...
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