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
6186383e
Commit
6186383e
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: simplify RLMVO string handling
parent
b891e5f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
37 deletions
+9
-37
Keyboard.c
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+9
-37
No files found.
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
View file @
6186383e
...
...
@@ -570,7 +570,6 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff)
int
i
,
j
;
XKeyboardState
values
;
char
*
model
=
NULL
,
*
layout
=
NULL
;
int
free_model
=
0
,
free_layout
=
0
;
XkbDescPtr
xkb
=
NULL
;
switch
(
onoff
)
...
...
@@ -726,16 +725,9 @@ XkbError:
XkbFreeKeyboard
(
xkb
,
XkbAllComponentsMask
,
True
);
xkb
=
NULL
;
if
(
free_model
)
{
free_model
=
0
;
free
(
model
);
}
if
(
free_layout
)
{
free_layout
=
0
;
free
(
layout
);
}
free
(
model
);
free
(
layout
);
#endif
XGetKeyboardControl
(
nxagentDisplay
,
&
values
);
...
...
@@ -757,7 +749,7 @@ XkbError:
#ifdef XKB
}
else
{
/* if (noXkbExtension) */
XkbComponentNamesRec
names
=
{
0
};
char
*
rules
,
*
variants
,
*
options
;
char
*
rules
=
NULL
,
*
variants
=
NULL
,
*
options
=
NULL
;
/* use xkb default */
#ifdef TEST
fprintf
(
stderr
,
"nxagentKeyboardProc: Using XKB extension.
\n
"
);
...
...
@@ -767,8 +759,6 @@ XkbError:
fprintf
(
stderr
,
"nxagentKeyboardProc: nxagentKeyboard is [%s].
\n
"
,
nxagentKeyboard
?
nxagentKeyboard
:
"NULL"
);
#endif
rules
=
NULL
;
/* use xkb default */
/*
from nxagent changelog:
2.0.22:
...
...
@@ -791,11 +781,8 @@ XkbError:
goto
XkbError
;
}
free_model
=
1
;
model
=
strndup
(
nxagentKeyboard
,
i
);
free_layout
=
1
;
layout
=
strdup
(
&
nxagentKeyboard
[
i
+
1
]);
model
=
strndup
(
nxagentKeyboard
,
i
);
layout
=
strdup
(
&
nxagentKeyboard
[
i
+
1
]);
/*
* There is no description for pc105 on Solaris.
...
...
@@ -824,18 +811,12 @@ XkbError:
}
else
{
layout
=
NULL
;
/* use xkb default */
model
=
NULL
;
/* use xkb default */
#ifdef TEST
fprintf
(
stderr
,
"nxagentKeyboardProc: Using default keyboard: model [%s] layout [%s].
\n
"
,
model
,
layout
);
#endif
}
variants
=
NULL
;
/* use xkb default */
options
=
NULL
;
/* use xkb default */
#ifdef TEST
fprintf
(
stderr
,
"nxagentKeyboardProc: Init XKB extension.
\n
"
);
#endif
...
...
@@ -900,20 +881,11 @@ XkbEnd:
NXShadowInitKeymap
(
&
(
pDev
->
key
->
curKeySyms
));
}
if
(
free_model
)
{
free_model
=
0
;
free
(
model
);
}
if
(
free_layout
)
{
free_layout
=
0
;
free
(
layout
);
}
XkbFreeKeyboard
(
xkb
,
XkbAllComponentsMask
,
True
);
xkb
=
NULL
;
free
(
model
);
free
(
layout
);
}
#endif
...
...
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