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
2b9d7d27
You need to sign in or sign up before continuing.
Commit
2b9d7d27
authored
Mar 23, 2017
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keystroke.c: use Booleans where appropriate
Some of the keystroke checks have used them before. This commit unifies those checks.
parent
076d458e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
Keystroke.c
nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
+13
-13
No files found.
nx-X11/programs/Xserver/hw/nxagent/Keystroke.c
View file @
2b9d7d27
...
@@ -48,7 +48,7 @@ extern Bool nxagentIpaq;
...
@@ -48,7 +48,7 @@ extern Bool nxagentIpaq;
extern
char
*
nxagentKeystrokeFile
;
extern
char
*
nxagentKeystrokeFile
;
#ifdef NX_DEBUG_INPUT
#ifdef NX_DEBUG_INPUT
int
nxagentDebugInputDevices
=
0
;
int
nxagentDebugInputDevices
=
False
;
unsigned
long
nxagentLastInputDevicesDumpTime
=
0
;
unsigned
long
nxagentLastInputDevicesDumpTime
=
0
;
extern
void
nxagentDeactivateInputDevicesGrabs
();
extern
void
nxagentDeactivateInputDevicesGrabs
();
#endif
#endif
...
@@ -618,12 +618,12 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
...
@@ -618,12 +618,12 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
* Used to test the input devices state.
* Used to test the input devices state.
*/
*/
if
(
X
->
type
==
KeyPress
)
{
if
(
X
->
type
==
KeyPress
)
{
if
(
nxagentDebugInputDevices
==
0
)
{
if
(
nxagentDebugInputDevices
==
False
)
{
fprintf
(
stderr
,
"Info: Turning input devices debug ON.
\n
"
);
fprintf
(
stderr
,
"Info: Turning input devices debug ON.
\n
"
);
nxagentDebugInputDevices
=
1
;
nxagentDebugInputDevices
=
True
;
}
else
{
}
else
{
fprintf
(
stderr
,
"Info: Turning input devices debug OFF.
\n
"
);
fprintf
(
stderr
,
"Info: Turning input devices debug OFF.
\n
"
);
nxagentDebugInputDevices
=
0
;
nxagentDebugInputDevices
=
False
;
nxagentLastInputDevicesDumpTime
=
0
;
nxagentLastInputDevicesDumpTime
=
0
;
}
}
}
}
...
@@ -637,31 +637,31 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
...
@@ -637,31 +637,31 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
break
;
break
;
#endif
#endif
case
KEYSTROKE_FULLSCREEN
:
case
KEYSTROKE_FULLSCREEN
:
if
(
nxagentOption
(
Rootless
)
==
0
)
{
if
(
nxagentOption
(
Rootless
)
==
False
)
{
*
result
=
doSwitchFullscreen
;
*
result
=
doSwitchFullscreen
;
}
}
break
;
break
;
case
KEYSTROKE_VIEWPORT_MOVE_LEFT
:
case
KEYSTROKE_VIEWPORT_MOVE_LEFT
:
if
(
nxagentOption
(
Rootless
)
==
0
&&
if
(
nxagentOption
(
Rootless
)
==
False
&&
nxagentOption
(
DesktopResize
)
==
0
)
{
nxagentOption
(
DesktopResize
)
==
False
)
{
*
result
=
doViewportMoveLeft
;
*
result
=
doViewportMoveLeft
;
}
}
break
;
break
;
case
KEYSTROKE_VIEWPORT_MOVE_UP
:
case
KEYSTROKE_VIEWPORT_MOVE_UP
:
if
(
nxagentOption
(
Rootless
)
==
0
&&
if
(
nxagentOption
(
Rootless
)
==
False
&&
nxagentOption
(
DesktopResize
)
==
0
)
{
nxagentOption
(
DesktopResize
)
==
False
)
{
*
result
=
doViewportMoveUp
;
*
result
=
doViewportMoveUp
;
}
}
break
;
break
;
case
KEYSTROKE_VIEWPORT_MOVE_RIGHT
:
case
KEYSTROKE_VIEWPORT_MOVE_RIGHT
:
if
(
nxagentOption
(
Rootless
)
==
0
&&
if
(
nxagentOption
(
Rootless
)
==
False
&&
nxagentOption
(
DesktopResize
)
==
0
)
{
nxagentOption
(
DesktopResize
)
==
False
)
{
*
result
=
doViewportMoveRight
;
*
result
=
doViewportMoveRight
;
}
}
break
;
break
;
case
KEYSTROKE_VIEWPORT_MOVE_DOWN
:
case
KEYSTROKE_VIEWPORT_MOVE_DOWN
:
if
(
nxagentOption
(
Rootless
)
==
0
&&
if
(
nxagentOption
(
Rootless
)
==
False
&&
nxagentOption
(
DesktopResize
)
==
0
)
{
nxagentOption
(
DesktopResize
)
==
False
)
{
*
result
=
doViewportMoveDown
;
*
result
=
doViewportMoveDown
;
}
}
break
;
break
;
...
...
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