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
a85adf5e
You need to sign in or sign up before continuing.
Commit
a85adf5e
authored
Dec 30, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxagent: treat DesktopResize and nxagentResizeDesktopAtStartup as Booleans
The already where Booleans but where not using True/False values everywhere
parent
de5eb54c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
19 deletions
+19
-19
Args.c
nx-X11/programs/Xserver/hw/nxagent/Args.c
+3
-3
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+5
-5
Extensions.c
nx-X11/programs/Xserver/hw/nxagent/Extensions.c
+4
-4
Options.c
nx-X11/programs/Xserver/hw/nxagent/Options.c
+1
-1
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+3
-3
Window.c
nx-X11/programs/Xserver/hw/nxagent/Window.c
+3
-3
No files found.
nx-X11/programs/Xserver/hw/nxagent/Args.c
View file @
a85adf5e
...
...
@@ -1220,13 +1220,13 @@ static void nxagentParseSingleOption(char *name, char *value)
}
else
if
(
!
strcmp
(
name
,
"resize"
))
{
if
(
nxagentOption
(
DesktopResize
)
==
0
||
strcmp
(
value
,
"0"
)
==
0
)
if
(
!
nxagentOption
(
DesktopResize
)
||
strcmp
(
value
,
"0"
)
==
0
)
{
nxagentResizeDesktopAtStartup
=
0
;
nxagentResizeDesktopAtStartup
=
False
;
}
else
if
(
strcmp
(
value
,
"1"
)
==
0
)
{
nxagentResizeDesktopAtStartup
=
1
;
nxagentResizeDesktopAtStartup
=
True
;
}
else
{
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
a85adf5e
...
...
@@ -569,7 +569,7 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
nxagentChangeOption
(
DesktopResize
,
!
desktopResize
);
if
(
nxagentOption
(
DesktopResize
)
==
0
)
if
(
!
nxagentOption
(
DesktopResize
)
)
{
fprintf
(
stderr
,
"Info: Disabled desktop resize mode in agent.
\n
"
);
...
...
@@ -607,7 +607,7 @@ void nxagentShadowSwitchResizeMode(ScreenPtr pScreen)
nxagentChangeOption
(
DesktopResize
,
!
desktopResize
);
if
(
nxagentOption
(
DesktopResize
)
==
0
)
if
(
!
nxagentOption
(
DesktopResize
)
)
{
nxagentShadowSetRatio
(
1
.
0
,
1
.
0
);
...
...
@@ -1229,7 +1229,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
}
}
if
(
nxagentOption
(
DesktopResize
)
==
False
&&
if
(
!
nxagentOption
(
DesktopResize
)
&&
(
X
.
xbutton
.
state
&
(
ControlMask
|
Mod1Mask
))
==
(
ControlMask
|
Mod1Mask
))
{
/*
...
...
@@ -3303,7 +3303,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
int
newX
=
X
->
xconfigure
.
x
;
int
newY
=
X
->
xconfigure
.
y
;
if
(
nxagentOption
(
DesktopResize
)
==
1
)
if
(
nxagentOption
(
DesktopResize
))
{
if
(
nxagentOption
(
Width
)
!=
X
->
xconfigure
.
width
||
nxagentOption
(
Height
)
!=
X
->
xconfigure
.
height
||
...
...
@@ -3369,7 +3369,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
nxagentChangeOption
(
Y
,
newY
);
}
if
(
nxagentOption
(
Shadow
)
==
1
&&
nxagentOption
(
DesktopResize
)
==
1
&&
if
(
nxagentOption
(
Shadow
)
==
1
&&
nxagentOption
(
DesktopResize
)
&&
(
nxagentOption
(
Width
)
!=
X
->
xconfigure
.
width
||
nxagentOption
(
Height
)
!=
X
->
xconfigure
.
height
))
{
...
...
nx-X11/programs/Xserver/hw/nxagent/Extensions.c
View file @
a85adf5e
...
...
@@ -429,7 +429,7 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
{
UpdateCurrentTime
();
if
(
nxagentOption
(
DesktopResize
)
==
1
&&
if
(
nxagentOption
(
DesktopResize
)
&&
(
nxagentOption
(
Fullscreen
)
||
width
>
WidthOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
))
||
height
>
HeightOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
))))
...
...
@@ -437,11 +437,11 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
if
(
nxagentOption
(
ClientOs
)
!=
ClientOsWinnt
/*&& nxagentOption(ClientOs) != ClientNXPlayer*/
)
{
nxagentChangeOption
(
DesktopResize
,
0
);
nxagentChangeOption
(
DesktopResize
,
False
);
}
}
if
(
nxagentOption
(
DesktopResize
)
==
1
&&
!
nxagentOption
(
Fullscreen
)
&&
if
(
nxagentOption
(
DesktopResize
)
&&
!
nxagentOption
(
Fullscreen
)
&&
!
nxagentOption
(
AllScreens
))
{
nxagentChangeOption
(
Width
,
width
);
...
...
@@ -450,7 +450,7 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
int
result
=
nxagentResizeScreen
(
pScreen
,
width
,
height
,
mmWidth
,
mmHeight
,
True
);
if
(
result
==
1
&&
nxagentOption
(
DesktopResize
)
==
1
&&
if
(
result
==
1
&&
nxagentOption
(
DesktopResize
)
&&
!
nxagentOption
(
Fullscreen
)
&&
!
nxagentOption
(
AllScreens
))
{
nxagentRandRSetWindowsSize
(
width
,
height
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.c
View file @
a85adf5e
...
...
@@ -108,7 +108,7 @@ void nxagentInitOptions(void)
nxagentOptions
.
ViewportXSpan
=
0
;
nxagentOptions
.
ViewportYSpan
=
0
;
nxagentOptions
.
DesktopResize
=
1
;
nxagentOptions
.
DesktopResize
=
True
;
nxagentOptions
.
Ratio
=
DONT_SCALE
;
nxagentOptions
.
XRatio
=
DONT_SCALE
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
a85adf5e
...
...
@@ -966,7 +966,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
if
(
nxagentOption
(
Fullscreen
)
&&
nxagentWMIsRunning
&&
nxagentReconnectTrap
&&
nxagentResizeDesktopAtStartup
==
False
&&
!
nxagentResizeDesktopAtStartup
&&
nxagentXServerGeometryChanged
())
{
#ifdef TEST
...
...
@@ -1836,7 +1836,7 @@ N/A
sizeHints
->
width
=
nxagentOption
(
RootWidth
);
sizeHints
->
height
=
nxagentOption
(
RootHeight
);
if
(
nxagentOption
(
DesktopResize
)
==
1
||
nxagentOption
(
Fullscreen
))
if
(
nxagentOption
(
DesktopResize
)
||
nxagentOption
(
Fullscreen
))
{
sizeHints
->
max_width
=
WidthOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
));
sizeHints
->
max_height
=
HeightOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
));
...
...
@@ -4399,7 +4399,7 @@ void nxagentSetWMNormalHints(int screen, int width, int height)
sizeHints
->
width
=
width
;
sizeHints
->
height
=
height
;
if
(
nxagentOption
(
DesktopResize
)
==
1
)
if
(
nxagentOption
(
DesktopResize
))
{
sizeHints
->
max_width
=
WidthOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
));
sizeHints
->
max_height
=
HeightOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
));
...
...
nx-X11/programs/Xserver/hw/nxagent/Window.c
View file @
a85adf5e
...
...
@@ -901,7 +901,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
XCheckTypedWindowEvent
(
nxagentDisplay
,
w
,
LeaveNotify
,
&
e
);
nxagentFullscreenWindow
=
w
;
if
(
nxagentOption
(
DesktopResize
)
==
1
)
if
(
nxagentOption
(
DesktopResize
))
{
if
(
nxagentOption
(
Shadow
)
==
0
)
{
...
...
@@ -952,7 +952,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
nxagentIconWindow
=
nxagentFullscreenWindow
=
None
;
if
(
nxagentOption
(
DesktopResize
)
==
1
)
if
(
nxagentOption
(
DesktopResize
))
{
nxagentChangeOption
(
RootWidth
,
nxagentOption
(
SavedRootWidth
));
nxagentChangeOption
(
RootHeight
,
nxagentOption
(
SavedRootHeight
));
...
...
@@ -998,7 +998,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
nxagentChangeOption
(
Width
,
nxagentOption
(
SavedWidth
));
nxagentChangeOption
(
Height
,
nxagentOption
(
SavedHeight
));
if
(
nxagentOption
(
Shadow
)
==
1
&&
nxagentOption
(
DesktopResize
)
==
1
)
if
(
nxagentOption
(
Shadow
)
==
1
&&
nxagentOption
(
DesktopResize
))
{
nxagentShadowAdaptToRatio
();
}
...
...
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