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
acb861df
Commit
acb861df
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: make nxagentOption Shadow a Boolean
and add the missing init code.
parent
2565484f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
25 deletions
+26
-25
Args.c
nx-X11/programs/Xserver/hw/nxagent/Args.c
+7
-7
Drawable.c
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+3
-3
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+7
-7
Image.c
nx-X11/programs/Xserver/hw/nxagent/Image.c
+1
-1
Keyboard.c
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+1
-1
NXdispatch.c
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+1
-1
Options.c
nx-X11/programs/Xserver/hw/nxagent/Options.c
+1
-0
Pixels.h
nx-X11/programs/Xserver/hw/nxagent/Pixels.h
+1
-1
Window.c
nx-X11/programs/Xserver/hw/nxagent/Window.c
+4
-4
No files found.
nx-X11/programs/Xserver/hw/nxagent/Args.c
View file @
acb861df
...
...
@@ -507,7 +507,7 @@ int ddxProcessArgument(int argc, char *argv[], int i)
sscanf
(
argv
[
i
],
"%i"
,
&
level
)
==
1
&&
level
>=
0
&&
level
<=
2
)
{
if
(
nxagentOption
(
Shadow
)
==
0
)
if
(
!
nxagentOption
(
Shadow
)
)
{
nxagentChangeOption
(
DeferLevel
,
level
);
...
...
@@ -830,7 +830,7 @@ int ddxProcessArgument(int argc, char *argv[], int i)
if
(
!
strcmp
(
argv
[
i
],
"-S"
))
{
nxagentChangeOption
(
Shadow
,
1
);
nxagentChangeOption
(
Shadow
,
True
);
nxagentChangeOption
(
DeferLevel
,
0
);
nxagentChangeOption
(
Persistent
,
False
);
return
1
;
...
...
@@ -1749,7 +1749,7 @@ N/A
#endif
if
((
nxagentOption
(
Rootless
)
==
1
)
&&
nxagentOption
(
Fullscreen
))
if
((
nxagentOption
(
Rootless
)
==
True
)
&&
nxagentOption
(
Fullscreen
))
{
#ifdef TEST
fprintf
(
stderr
,
"WARNING: Ignoring fullscreen option for rootless session.
\n
"
);
...
...
@@ -2029,7 +2029,7 @@ FIXME: In rootless mode the backing-store support is not functional yet.
nxagentAlphaEnabled
=
False
;
}
if
((
nxagentOption
(
Rootless
)
==
1
)
&&
nxagentOption
(
Xdmcp
))
if
((
nxagentOption
(
Rootless
)
==
True
)
&&
nxagentOption
(
Xdmcp
))
{
FatalError
(
"PANIC! Cannot start a XDMCP session in rootless mode.
\n
"
);
}
...
...
@@ -2353,7 +2353,7 @@ void nxagentSetDeferLevel(void)
* Set the defer timeout.
*/
if
(
nxagentOption
(
Shadow
)
==
1
)
if
(
nxagentOption
(
Shadow
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentSetDeferLevel: Ignoring defer timeout parameter in shadow mode.
\n
"
);
...
...
@@ -2368,7 +2368,7 @@ void nxagentSetDeferLevel(void)
* Set the defer level.
*/
if
(
nxagentOption
(
Shadow
)
==
1
)
if
(
nxagentOption
(
Shadow
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentSetDeferLevel: Ignoring defer parameter in shadow mode.
\n
"
);
...
...
@@ -2472,7 +2472,7 @@ void nxagentSetScheduler(void)
* The smart scheduler is the default.
*/
if
(
nxagentOption
(
Shadow
)
==
1
)
if
(
nxagentOption
(
Shadow
))
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentSetScheduler: Using the dumb scheduler in shadow mode.
\n
"
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
View file @
acb861df
...
...
@@ -799,7 +799,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if
(
owner
!=
NULL
)
{
if
(
nxagentOption
(
Shadow
)
==
1
&&
if
(
nxagentOption
(
Shadow
)
&&
(
nxagentOption
(
XRatio
)
!=
DONT_SCALE
||
nxagentOption
(
YRatio
)
!=
DONT_SCALE
))
{
...
...
@@ -852,7 +852,7 @@ nxagentSynchronizeRegionStop:
success
=
1
;
if
(
nxagentOption
(
Shadow
)
==
0
)
if
(
!
nxagentOption
(
Shadow
)
)
{
if
(
nxagentSynchronization
.
abort
==
1
)
{
...
...
@@ -921,7 +921,7 @@ nxagentSynchronizeRegionStop:
int
w
=
RegionRects
(
&
collectedUpdates
)[
i
].
x2
-
RegionRects
(
&
collectedUpdates
)[
i
].
x1
;
int
h
=
RegionRects
(
&
collectedUpdates
)[
i
].
y2
-
RegionRects
(
&
collectedUpdates
)[
i
].
y1
;
if
(
nxagentOption
(
Shadow
)
==
1
&&
if
(
nxagentOption
(
Shadow
)
&&
(
nxagentOption
(
XRatio
)
!=
DONT_SCALE
||
nxagentOption
(
YRatio
)
!=
DONT_SCALE
))
{
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
acb861df
...
...
@@ -1043,7 +1043,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
}
case
doSwitchResizeMode
:
{
if
(
nxagentOption
(
Shadow
)
==
0
)
if
(
!
nxagentOption
(
Shadow
)
)
{
if
(
nxagentNoDialogIsRunning
)
{
...
...
@@ -1097,7 +1097,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate)
nxagentRemoveDuplicatedKeys
(
&
X
);
}
if
(
!
nxagentOption
(
ViewOnly
)
&&
nxagentOption
(
Shadow
)
==
1
&&
result
==
doNothing
)
if
(
!
nxagentOption
(
ViewOnly
)
&&
nxagentOption
(
Shadow
)
&&
result
==
doNothing
)
{
X
.
xkey
.
keycode
=
nxagentConvertKeycode
(
X
.
xkey
.
keycode
);
...
...
@@ -1492,7 +1492,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
NXShadowEvent
(
nxagentDisplay
,
X
);
}
if
(
nxagentOption
(
Shadow
)
==
0
)
if
(
!
nxagentOption
(
Shadow
)
)
{
nxagentInputEvent
=
1
;
}
...
...
@@ -3369,7 +3369,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
nxagentChangeOption
(
Y
,
newY
);
}
if
(
nxagentOption
(
Shadow
)
==
1
&&
nxagentOption
(
DesktopResize
)
&&
if
(
nxagentOption
(
Shadow
)
&&
nxagentOption
(
DesktopResize
)
&&
(
nxagentOption
(
Width
)
!=
X
->
xconfigure
.
width
||
nxagentOption
(
Height
)
!=
X
->
xconfigure
.
height
))
{
...
...
@@ -3397,7 +3397,7 @@ int nxagentHandleConfigureNotify(XEvent* X)
/* if in shadowing mode or if neither size nor position have
changed we do not need to adjust RandR */
/* FIXME: Comment makes no sense */
if
(
nxagentOption
(
Shadow
)
==
1
||
if
(
nxagentOption
(
Shadow
)
||
(
nxagentOption
(
Width
)
==
nxagentOption
(
RootWidth
)
&&
nxagentOption
(
Height
)
==
nxagentOption
(
RootHeight
)
&&
nxagentOption
(
X
)
==
nxagentOption
(
RootX
)
&&
...
...
@@ -4323,7 +4323,7 @@ int nxagentUserInput(void *p)
* eventually change the nxagentInputEvent status.
*/
if
(
nxagentOption
(
Shadow
)
==
1
&&
if
(
nxagentOption
(
Shadow
)
&&
nxagentPendingEvents
(
nxagentDisplay
)
>
0
)
{
nxagentDispatchEvents
(
NULL
);
...
...
@@ -4342,7 +4342,7 @@ int nxagentUserInput(void *p)
* browser's page), in order to update the screen smoothly.
*/
if
(
nxagentOption
(
Shadow
)
==
1
)
if
(
nxagentOption
(
Shadow
))
{
return
result
;
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Image.c
View file @
acb861df
...
...
@@ -925,7 +925,7 @@ void nxagentRealizeImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
int
bytesPerLine
=
nxagentImagePad
(
w
,
format
,
leftPad
,
depth
);
if
(
nxagentOption
(
Shadow
)
==
1
&&
format
==
ZPixmap
&&
if
(
nxagentOption
(
Shadow
)
&&
format
==
ZPixmap
&&
(
nxagentOption
(
XRatio
)
!=
DONT_SCALE
||
nxagentOption
(
YRatio
)
!=
DONT_SCALE
)
&&
pDrawable
==
(
DrawablePtr
)
nxagentShadowPixmapPtr
)
...
...
nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
View file @
acb861df
...
...
@@ -776,7 +776,7 @@ XkbError:
XkbDDXChangeControls
(
pDev
,
xkb
->
ctrls
,
xkb
->
ctrls
);
}
if
(
nxagentOption
(
Shadow
)
==
1
&&
pDev
&&
pDev
->
key
)
if
(
nxagentOption
(
Shadow
)
&&
pDev
&&
pDev
->
key
)
{
NXShadowInitKeymap
(
&
(
pDev
->
key
->
curKeySyms
));
}
...
...
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
View file @
acb861df
...
...
@@ -575,7 +575,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
fprintf
(
stderr
,
"Session: Session terminated at '%s'.
\n
"
,
GetTimeAsString
());
}
if
(
nxagentOption
(
Shadow
)
==
1
)
if
(
nxagentOption
(
Shadow
))
{
NXShadowDestroy
();
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.c
View file @
acb861df
...
...
@@ -62,6 +62,7 @@ void nxagentInitOptions(void)
nxagentOptions
.
Desktop
=
UNDEFINED
;
nxagentOptions
.
Persistent
=
True
;
nxagentOptions
.
Rootless
=
UNDEFINED
;
nxagentOptions
.
Shadow
=
False
;
nxagentOptions
.
Fullscreen
=
False
;
nxagentOptions
.
AllScreens
=
False
;
nxagentOptions
.
NoRootlessExit
=
False
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Pixels.h
View file @
acb861df
...
...
@@ -97,7 +97,7 @@ while (0)
nxagentUserInput(NULL) == 1)
#define canBreakOnTimeout(mask) \
(((mask) != NEVER_BREAK) &&
nxagentOption(Shadow) == 0
)
(((mask) != NEVER_BREAK) &&
!nxagentOption(Shadow)
)
/*
* Macros defining the conditions to
...
...
nx-X11/programs/Xserver/hw/nxagent/Window.c
View file @
acb861df
...
...
@@ -903,7 +903,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
if
(
nxagentOption
(
DesktopResize
))
{
if
(
nxagentOption
(
Shadow
)
==
0
)
if
(
!
nxagentOption
(
Shadow
)
)
{
nxagentChangeScreenConfig
(
0
,
WidthOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
)),
HeightOfScreen
(
DefaultScreenOfDisplay
(
nxagentDisplay
)),
True
);
...
...
@@ -957,7 +957,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
nxagentChangeOption
(
RootWidth
,
nxagentOption
(
SavedRootWidth
));
nxagentChangeOption
(
RootHeight
,
nxagentOption
(
SavedRootHeight
));
if
(
nxagentOption
(
Shadow
)
==
0
)
if
(
!
nxagentOption
(
Shadow
)
)
{
nxagentChangeScreenConfig
(
0
,
nxagentOption
(
RootWidth
),
nxagentOption
(
RootHeight
),
True
);
...
...
@@ -998,7 +998,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
nxagentChangeOption
(
Width
,
nxagentOption
(
SavedWidth
));
nxagentChangeOption
(
Height
,
nxagentOption
(
SavedHeight
));
if
(
nxagentOption
(
Shadow
)
==
1
&&
nxagentOption
(
DesktopResize
))
if
(
nxagentOption
(
Shadow
)
&&
nxagentOption
(
DesktopResize
))
{
nxagentShadowAdaptToRatio
();
}
...
...
@@ -2547,7 +2547,7 @@ void nxagentMapDefaultWindows(void)
* Windows client.
*/
if
(
nxagentOption
(
Shadow
)
==
0
||
!
nxagentWMIsRunning
)
if
(
!
nxagentOption
(
Shadow
)
||
!
nxagentWMIsRunning
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentMapDefaultWindows: Mapping default window id [%ld].
\n
"
,
...
...
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