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
567e700b
Commit
567e700b
authored
Jan 16, 2020
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Screen.c: document nxagentSaveScreen
parent
ae94215d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
22 deletions
+37
-22
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+37
-22
No files found.
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
567e700b
...
...
@@ -519,30 +519,47 @@ void nxagentSetScreenSaverTime(void)
#endif
}
/*
* This is the called when the "hardware" should take care of the
* blanking.
*
* "what" can be one if these:
* SCREEN_SAVER_ON Turns on the screen saver; disables video
* SCREEN_SAVER_OFF Turns off the screen saver; enables video
* SCREEN_SAVER_FORCER Updates time of last screen saver mode change
* SCREEN_SAVER_CYCLE Cycle to new pattern
*
* Returns True if the 'what' action was successful and False otherwise.
*
* Returning False the SaveScreens() function (which calls this one)
* tries to build a screen-saver creating a new window. In some cases
* we do not want this so we return True. If we want the dix to take
* care fo blanking we return False.
*/
static
Bool
nxagentSaveScreen
(
ScreenPtr
pScreen
,
int
what
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentSaveScreen: Called for screen at [%p] with parameter [%d].
\n
"
,
(
void
*
)
pScreen
,
what
);
fprintf
(
stderr
,
"nxagentSaveScreen: SCREEN_SAVER_ON is [%d] SCREEN_SAVER_OFF is [%d] "
"SCREEN_SAVER_FORCER is [%d] SCREEN_SAVER_CYCLE is [%d].
\n
"
,
SCREEN_SAVER_ON
,
SCREEN_SAVER_OFF
,
SCREEN_SAVER_FORCER
,
SCREEN_SAVER_CYCLE
);
fprintf
(
stderr
,
"%s: Called for screen at [%p] with parameter [%s]. ScreenSaverTime [%d]
\n
"
,
__func__
,
(
void
*
)
pScreen
,
what
==
SCREEN_SAVER_ON
?
"SCREEN_SAVER_ON"
:
what
==
SCREEN_SAVER_OFF
?
"SCREEN_SAVER_OFF"
:
what
==
SCREEN_SAVER_FORCER
?
"SCREEN_SAVER_FORCER"
:
what
==
SCREEN_SAVER_CYCLE
?
"SCREEN_SAVER_CYCLE"
:
"UNKNOWN"
,
ScreenSaverTime
);
#endif
if
(
what
==
SCREEN_SAVER_OFF
)
{
return
1
;
return
True
;
}
/*
* The lastDeviceEventTime is updated every time
* a device event is received, and it is used by
* WaitForSomething() to know when the SaveScreens()
* function should be called. This solution doesn't
* take care of a pointer button not released, so
* we have to handle this case by ourselves.
* The lastDeviceEventTime is updated every time a device event is
* received, and it is used by WaitForSomething() to know when the
* SaveScreens() function should be called. This solution doesn't
* take care of a pointer button not released, so we have to handle
* this case by ourselves.
*/
/*
...
...
@@ -552,21 +569,19 @@ FIXME: Do we need to check the key grab if the
if
(
inputInfo
.
pointer
->
button
->
buttonsDown
>
0
)
{
#ifdef TEST
fprintf
(
stderr
,
"
nxagentSaveScreen: Ignoring timeout, there is a pointer button down.
\n
"
);
fprintf
(
stderr
,
"
%s: Ignoring timeout, there is a pointer button down.
\n
"
,
__func__
);
#endif
/*
* Returning 0 the SaveScreens() function
* (which calls this one) tries to build
* a screen-saver creating a new window.
* We don't want this, so we return 1 in
* any case.
* Returning False the SaveScreens() function (which calls this one)
* tries to build a screen-saver creating a new window. We don't
* want this, so we return True here.
*/
return
1
;
return
True
;
}
return
1
;
return
True
;
}
Bool
nxagentCreateScreenResources
(
ScreenPtr
pScreen
)
...
...
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