Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xfce4-screensaver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bobby Rong
xfce4-screensaver
Commits
a7463885
Commit
a7463885
authored
4 years ago
by
Sean Davis
Browse files
Options
Downloads
Patches
Plain Diff
Change DPMS sleep settings to seconds, default sleep after 5 seconds (
#27
)
parent
5581ac2c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/gs-manager.c
+3
-3
3 additions, 3 deletions
src/gs-manager.c
src/gs-prefs.h
+2
-2
2 additions, 2 deletions
src/gs-prefs.h
src/xfce4-screensaver-configure
+1
-1
1 addition, 1 deletion
src/xfce4-screensaver-configure
with
6 additions
and
6 deletions
src/gs-manager.c
+
3
−
3
View file @
a7463885
...
@@ -564,7 +564,7 @@ activate_dpms_timeout (GSManager *manager) {
...
@@ -564,7 +564,7 @@ activate_dpms_timeout (GSManager *manager) {
gs_debug
(
"DPMS: On -> Standby"
);
gs_debug
(
"DPMS: On -> Standby"
);
DPMSForceLevel
(
gdk_x11_get_default_xdisplay
(),
DPMSModeStandby
);
DPMSForceLevel
(
gdk_x11_get_default_xdisplay
(),
DPMSModeStandby
);
remove_dpms_timer
(
manager
);
remove_dpms_timer
(
manager
);
add_dpms_timer
(
manager
,
manager
->
priv
->
prefs
->
dpms_off_timeout
);
add_dpms_timer
(
manager
,
manager
->
priv
->
prefs
->
dpms_off_timeout
*
60
);
return
FALSE
;
return
FALSE
;
}
else
if
(
power_level
==
DPMSModeStandby
||
power_level
==
DPMSModeSuspend
)
{
}
else
if
(
power_level
==
DPMSModeStandby
||
power_level
==
DPMSModeSuspend
)
{
gs_debug
(
"DPMS: %s -> Off"
,
power_level
==
DPMSModeStandby
?
"Standby"
:
"Suspend"
);
gs_debug
(
"DPMS: %s -> Off"
,
power_level
==
DPMSModeStandby
?
"Standby"
:
"Suspend"
);
...
@@ -595,8 +595,8 @@ add_dpms_timer (GSManager *manager,
...
@@ -595,8 +595,8 @@ add_dpms_timer (GSManager *manager,
if
(
timeout
==
0
)
if
(
timeout
==
0
)
return
;
return
;
gs_debug
(
"Scheduling DPMS change after screensaver is idling for %i
minute
(s)"
,
timeout
);
gs_debug
(
"Scheduling DPMS change after screensaver is idling for %i
seconds
(s)"
,
timeout
);
manager
->
priv
->
dpms_timeout_id
=
g_timeout_add_seconds
(
timeout
*
60
,
manager
->
priv
->
dpms_timeout_id
=
g_timeout_add_seconds
(
timeout
,
(
GSourceFunc
)
activate_dpms_timeout
,
(
GSourceFunc
)
activate_dpms_timeout
,
manager
);
manager
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/gs-prefs.h
+
2
−
2
View file @
a7463885
...
@@ -186,7 +186,7 @@ G_BEGIN_DECLS
...
@@ -186,7 +186,7 @@ G_BEGIN_DECLS
#define DEFAULT_KEY_USER_SWITCH_ENABLED TRUE
#define DEFAULT_KEY_USER_SWITCH_ENABLED TRUE
/**
/**
* Blank screensaver DPMS sleep timeout
* Blank screensaver DPMS sleep timeout
(seconds)
* This value controls the timeout after blanking the screen to suspend the display.
* This value controls the timeout after blanking the screen to suspend the display.
* A value of 0 means that it is disabled.
* A value of 0 means that it is disabled.
*/
*/
...
@@ -194,7 +194,7 @@ G_BEGIN_DECLS
...
@@ -194,7 +194,7 @@ G_BEGIN_DECLS
#define DEFAULT_KEY_DPMS_SLEEP_AFTER 5
#define DEFAULT_KEY_DPMS_SLEEP_AFTER 5
/**
/**
* Blank screensaver DPMS power timeout
* Blank screensaver DPMS power timeout
(minutes)
* This value controls the timeout after blanking the screen to power off the display.
* This value controls the timeout after blanking the screen to power off the display.
* A value of 0 means that it is disabled.
* A value of 0 means that it is disabled.
*/
*/
...
...
This diff is collapsed.
Click to expand it.
src/xfce4-screensaver-configure
+
1
−
1
View file @
a7463885
...
@@ -186,7 +186,7 @@ class DesktopScreensaverSettings(ScreensaverSettings):
...
@@ -186,7 +186,7 @@ class DesktopScreensaverSettings(ScreensaverSettings):
options
[
"
dpms-sleep-after
"
]
=
{
'
id
'
:
'
dpms-sleep-after
'
,
'
type
'
:
'
slider
'
,
options
[
"
dpms-sleep-after
"
]
=
{
'
id
'
:
'
dpms-sleep-after
'
,
'
type
'
:
'
slider
'
,
'
label
'
:
_
(
'
After blanking, put display to sleep after
'
),
'
label
'
:
_
(
'
After blanking, put display to sleep after
'
),
'
default
'
:
5
,
'
low
'
:
0
,
'
high
'
:
60
,
'
step
'
:
1
,
'
default
'
:
5
,
'
low
'
:
0
,
'
high
'
:
60
,
'
step
'
:
1
,
'
low-label
'
:
_
(
'
Never
'
),
'
high-label
'
:
_
(
'
60
minute
s
'
)}
'
low-label
'
:
_
(
'
Never
'
),
'
high-label
'
:
_
(
'
60
second
s
'
)}
options
[
"
dpms-off-after
"
]
=
{
'
id
'
:
'
dpms-off-after
'
,
'
type
'
:
'
slider
'
,
options
[
"
dpms-off-after
"
]
=
{
'
id
'
:
'
dpms-off-after
'
,
'
type
'
:
'
slider
'
,
'
label
'
:
_
(
'
After sleeping, switch display off after
'
),
'
label
'
:
_
(
'
After sleeping, switch display off after
'
),
'
default
'
:
15
,
'
low
'
:
0
,
'
high
'
:
60
,
'
step
'
:
1
,
'
default
'
:
15
,
'
low
'
:
0
,
'
high
'
:
60
,
'
step
'
:
1
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment