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
ae94215d
Commit
ae94215d
authored
Jan 16, 2020
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxagent: remove now-obsolete own copies of ScreenSaver procs
we moved the auto-disconnect feature to an own timer so there's no need for a special treatment in screen saver stuff anymore.
parent
46ec0036
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
279 deletions
+0
-279
dispatch.c
nx-X11/programs/Xserver/dix/dispatch.c
+0
-5
window.c
nx-X11/programs/Xserver/dix/window.c
+0
-2
NXdispatch.c
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+0
-149
NXwindow.c
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+0
-123
No files found.
nx-X11/programs/Xserver/dix/dispatch.c
View file @
ae94215d
...
...
@@ -3167,8 +3167,6 @@ ProcQueryBestSize (register ClientPtr client)
return
(
client
->
noClientException
);
}
#ifndef NXAGENT_SERVER
int
ProcSetScreenSaver
(
register
ClientPtr
client
)
{
...
...
@@ -3224,7 +3222,6 @@ ProcSetScreenSaver (register ClientPtr client)
SetScreenSaverTimer
();
return
(
client
->
noClientException
);
}
#endif
/* NXAGENT_SERVER */
int
ProcGetScreenSaver
(
register
ClientPtr
client
)
...
...
@@ -3425,7 +3422,6 @@ ProcChangeCloseDownMode(register ClientPtr client)
}
}
#ifndef NXAGENT_SERVER
int
ProcForceScreenSaver
(
register
ClientPtr
client
)
{
REQUEST
(
xForceScreenSaverReq
);
...
...
@@ -3441,7 +3437,6 @@ int ProcForceScreenSaver(register ClientPtr client)
SaveScreens
(
SCREEN_SAVER_FORCER
,
(
int
)
stuff
->
mode
);
return
client
->
noClientException
;
}
#endif
/* NXAGENT_SERVER */
int
ProcNoOperation
(
register
ClientPtr
client
)
{
...
...
nx-X11/programs/Xserver/dix/window.c
View file @
ae94215d
...
...
@@ -3334,7 +3334,6 @@ static void DrawLogo(
);
#endif
#ifndef NXAGENT_SERVER
void
SaveScreens
(
int
on
,
int
mode
)
{
...
...
@@ -3445,7 +3444,6 @@ SaveScreens(int on, int mode)
if
(
mode
==
ScreenSaverReset
)
SetScreenSaverTimer
();
}
#endif
/* NXAGENT_SERVER */
static
Bool
TileScreenSaver
(
int
i
,
int
kind
)
...
...
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
View file @
ae94215d
...
...
@@ -978,155 +978,6 @@ ProcFreePixmap(register ClientPtr client)
}
}
int
ProcSetScreenSaver
(
register
ClientPtr
client
)
{
int
blankingOption
,
exposureOption
;
REQUEST
(
xSetScreenSaverReq
);
REQUEST_SIZE_MATCH
(
xSetScreenSaverReq
);
blankingOption
=
stuff
->
preferBlank
;
if
((
blankingOption
!=
DontPreferBlanking
)
&&
(
blankingOption
!=
PreferBlanking
)
&&
(
blankingOption
!=
DefaultBlanking
))
{
client
->
errorValue
=
blankingOption
;
return
BadValue
;
}
exposureOption
=
stuff
->
allowExpose
;
if
((
exposureOption
!=
DontAllowExposures
)
&&
(
exposureOption
!=
AllowExposures
)
&&
(
exposureOption
!=
DefaultExposures
))
{
client
->
errorValue
=
exposureOption
;
return
BadValue
;
}
if
(
stuff
->
timeout
<
-
1
)
{
client
->
errorValue
=
stuff
->
timeout
;
return
BadValue
;
}
if
(
stuff
->
interval
<
-
1
)
{
client
->
errorValue
=
stuff
->
interval
;
return
BadValue
;
}
#ifdef NXAGENT_SERVER
/*
* The NX agent uses the screen saver procedure
* to monitor the user activities and launch its
* handlers (like timeout feature), so we can't
* always allow the clients to change our values.
*/
#ifdef TEST
fprintf
(
stderr
,
"ProcSetScreenSaver: Called with timeout [%d] interval [%d] Blanking [%d] Exposure [%d].
\n
"
,
stuff
->
timeout
,
stuff
->
interval
,
blankingOption
,
exposureOption
);
#endif
if
(
nxagentOption
(
Timeout
)
==
0
)
{
#endif
if
(
blankingOption
==
DefaultBlanking
)
{
ScreenSaverBlanking
=
defaultScreenSaverBlanking
;
}
else
{
ScreenSaverBlanking
=
blankingOption
;
}
if
(
exposureOption
==
DefaultExposures
)
{
ScreenSaverAllowExposures
=
defaultScreenSaverAllowExposures
;
}
else
{
ScreenSaverAllowExposures
=
exposureOption
;
}
if
(
stuff
->
timeout
>=
0
)
{
ScreenSaverTime
=
stuff
->
timeout
*
MILLI_PER_SECOND
;
}
else
{
ScreenSaverTime
=
defaultScreenSaverTime
;
}
if
(
stuff
->
interval
>=
0
)
{
ScreenSaverInterval
=
stuff
->
interval
*
MILLI_PER_SECOND
;
}
else
{
ScreenSaverInterval
=
defaultScreenSaverInterval
;
}
SetScreenSaverTimer
();
#ifdef NXAGENT_SERVER
}
#ifdef TEST
else
{
fprintf
(
stderr
,
"ProcSetScreenSaver: Keeping auto-disconnect timeout set to [%d] seconds.
\n
"
,
nxagentOption
(
Timeout
));
}
#endif
#endif
return
(
client
->
noClientException
);
}
int
ProcForceScreenSaver
(
register
ClientPtr
client
)
{
REQUEST
(
xForceScreenSaverReq
);
REQUEST_SIZE_MATCH
(
xForceScreenSaverReq
);
if
((
stuff
->
mode
!=
ScreenSaverReset
)
&&
(
stuff
->
mode
!=
ScreenSaverActive
))
{
client
->
errorValue
=
stuff
->
mode
;
return
BadValue
;
}
#ifdef NXAGENT_SERVER
/*
* The NX agent uses the screen saver procedure
* to monitor the user activities and launch its
* handlers (like timeout feature), so we can't
* always allow the clients to force the screen
* saver handler execution.
*/
if
(
nxagentOption
(
Timeout
)
==
0
)
{
#endif
SaveScreens
(
SCREEN_SAVER_FORCER
,
(
int
)
stuff
->
mode
);
#ifdef NXAGENT_SERVER
}
#ifdef TEST
else
{
fprintf
(
stderr
,
"ProcForceScreenSaver: Ignoring the client request with mode [%d].
\n
"
,
stuff
->
mode
);
}
#endif
#endif
return
client
->
noClientException
;
}
/**********************
* CloseDownClient
*
...
...
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
View file @
ae94215d
...
...
@@ -783,126 +783,3 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
return
(
Success
);
}
void
SaveScreens
(
int
on
,
int
mode
)
{
int
i
;
int
what
;
int
type
;
if
(
on
==
SCREEN_SAVER_FORCER
)
{
if
(
mode
==
ScreenSaverReset
)
what
=
SCREEN_SAVER_OFF
;
else
what
=
SCREEN_SAVER_ON
;
type
=
what
;
}
else
{
what
=
on
;
type
=
what
;
if
(
what
==
screenIsSaved
)
type
=
SCREEN_SAVER_CYCLE
;
}
for
(
i
=
0
;
i
<
screenInfo
.
numScreens
;
i
++
)
{
if
(
on
==
SCREEN_SAVER_FORCER
)
(
*
screenInfo
.
screens
[
i
]
->
SaveScreen
)
(
screenInfo
.
screens
[
i
],
on
);
if
(
savedScreenInfo
[
i
].
ExternalScreenSaver
)
{
#ifdef NXAGENT_SERVER
if
(
nxagentOption
(
Timeout
)
!=
0
)
{
#ifdef TEST
fprintf
(
stderr
,
"SaveScreens: An external screen-saver handler is installed. "
"Ignoring it to let the auto-disconnect feature work.
\n
"
);
#endif
}
else
#endif
{
if
((
*
savedScreenInfo
[
i
].
ExternalScreenSaver
)
(
screenInfo
.
screens
[
i
],
type
,
on
==
SCREEN_SAVER_FORCER
))
continue
;
}
}
if
(
type
==
screenIsSaved
)
continue
;
switch
(
type
)
{
case
SCREEN_SAVER_OFF
:
if
(
savedScreenInfo
[
i
].
blanked
==
SCREEN_IS_BLANKED
)
{
(
*
screenInfo
.
screens
[
i
]
->
SaveScreen
)
(
screenInfo
.
screens
[
i
],
what
);
}
else
if
(
HasSaverWindow
(
i
))
{
savedScreenInfo
[
i
].
pWindow
=
NullWindow
;
FreeResource
(
savedScreenInfo
[
i
].
wid
,
RT_NONE
);
}
break
;
case
SCREEN_SAVER_CYCLE
:
if
(
savedScreenInfo
[
i
].
blanked
==
SCREEN_IS_TILED
)
{
WindowPtr
pWin
=
savedScreenInfo
[
i
].
pWindow
;
/* make it look like screen saver is off, so that
* NotClippedByChildren will compute a clip list
* for the root window, so miPaintWindow works
*/
screenIsSaved
=
SCREEN_SAVER_OFF
;
#ifndef NOLOGOHACK
if
(
logoScreenSaver
)
(
*
pWin
->
drawable
.
pScreen
->
ClearToBackground
)(
pWin
,
0
,
0
,
0
,
0
,
FALSE
);
#endif
(
*
pWin
->
drawable
.
pScreen
->
MoveWindow
)(
pWin
,
(
short
)(
-
(
rand
()
%
RANDOM_WIDTH
)),
(
short
)(
-
(
rand
()
%
RANDOM_WIDTH
)),
pWin
->
nextSib
,
VTMove
);
#ifndef NOLOGOHACK
if
(
logoScreenSaver
)
DrawLogo
(
pWin
);
#endif
screenIsSaved
=
SCREEN_SAVER_ON
;
}
/*
* Call the DDX saver in case it wants to do something
* at cycle time
*/
else
if
(
savedScreenInfo
[
i
].
blanked
==
SCREEN_IS_BLANKED
)
{
(
*
screenInfo
.
screens
[
i
]
->
SaveScreen
)
(
screenInfo
.
screens
[
i
],
type
);
}
break
;
case
SCREEN_SAVER_ON
:
if
(
ScreenSaverBlanking
!=
DontPreferBlanking
)
{
if
((
*
screenInfo
.
screens
[
i
]
->
SaveScreen
)
(
screenInfo
.
screens
[
i
],
what
))
{
savedScreenInfo
[
i
].
blanked
=
SCREEN_IS_BLANKED
;
continue
;
}
if
((
ScreenSaverAllowExposures
!=
DontAllowExposures
)
&&
TileScreenSaver
(
i
,
SCREEN_IS_BLACK
))
{
savedScreenInfo
[
i
].
blanked
=
SCREEN_IS_BLACK
;
continue
;
}
}
if
((
ScreenSaverAllowExposures
!=
DontAllowExposures
)
&&
TileScreenSaver
(
i
,
SCREEN_IS_TILED
))
{
savedScreenInfo
[
i
].
blanked
=
SCREEN_IS_TILED
;
}
else
savedScreenInfo
[
i
].
blanked
=
SCREEN_ISNT_SAVED
;
break
;
}
}
screenIsSaved
=
what
;
if
(
mode
==
ScreenSaverReset
)
SetScreenSaverTimer
();
}
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