work around x dpms bug which seems to forget about doing dpms 2nd time
around so force a reset of screensaver/dpms settings after coming out of blank. SVN revision: 75940
This commit is contained in:
parent
0bf9f5c96c
commit
7d595adf7b
|
@ -65,6 +65,25 @@ e_dpms_update(void)
|
||||||
if (changed) ecore_x_dpms_timeouts_set(standby, suspend, off);
|
if (changed) ecore_x_dpms_timeouts_set(standby, suspend, off);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_dpms_force_update(void)
|
||||||
|
{
|
||||||
|
unsigned int standby = 0, suspend = 0, off = 0;
|
||||||
|
int enabled;
|
||||||
|
|
||||||
|
enabled = ((e_config->dpms_enable) && (!e_config->mode.presentation) &&
|
||||||
|
(!e_util_fullscreen_curreny_any()));
|
||||||
|
ecore_x_dpms_enabled_set(enabled);
|
||||||
|
if (!enabled) return;
|
||||||
|
if (e_config->dpms_standby_enable)
|
||||||
|
standby = e_config->dpms_standby_timeout;
|
||||||
|
if (e_config->dpms_suspend_enable)
|
||||||
|
suspend = e_config->dpms_suspend_timeout;
|
||||||
|
if (e_config->dpms_off_enable)
|
||||||
|
off = e_config->dpms_off_timeout;
|
||||||
|
ecore_x_dpms_timeouts_set(standby, suspend, off);
|
||||||
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_dpms_handler_config_mode_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
_e_dpms_handler_config_mode_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,6 +7,7 @@ EINTERN int e_dpms_init(void);
|
||||||
EINTERN int e_dpms_shutdown(void);
|
EINTERN int e_dpms_shutdown(void);
|
||||||
|
|
||||||
EAPI void e_dpms_update(void);
|
EAPI void e_dpms_update(void);
|
||||||
|
EAPI void e_dpms_force_update(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -60,6 +60,20 @@ e_screensaver_update(void)
|
||||||
if (changed) ecore_x_screensaver_set(timeout, interval, blanking, expose);
|
if (changed) ecore_x_screensaver_set(timeout, interval, blanking, expose);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_screensaver_force_update(void)
|
||||||
|
{
|
||||||
|
int timeout = 0, count = (1 + _e_screensaver_ask_presentation_count);
|
||||||
|
|
||||||
|
if ((e_config->screensaver_enable) && (!e_config->mode.presentation) &&
|
||||||
|
(!e_util_fullscreen_curreny_any()))
|
||||||
|
timeout = e_config->screensaver_timeout * count;
|
||||||
|
ecore_x_screensaver_set(timeout,
|
||||||
|
e_config->screensaver_interval,
|
||||||
|
e_config->screensaver_blanking,
|
||||||
|
e_config->screensaver_expose);
|
||||||
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_screensaver_handler_config_mode_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
_e_screensaver_handler_config_mode_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
|
@ -210,6 +224,9 @@ _e_screensaver_handler_screensaver_notify_cb(void *data __UNUSED__, int type __U
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
e_screensaver_force_update();
|
||||||
|
e_dpms_force_update();
|
||||||
|
|
||||||
_e_screensaver_on = EINA_FALSE;
|
_e_screensaver_on = EINA_FALSE;
|
||||||
if (_e_screensaver_suspend_timer)
|
if (_e_screensaver_suspend_timer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,6 +7,7 @@ EINTERN int e_screensaver_init(void);
|
||||||
EINTERN int e_screensaver_shutdown(void);
|
EINTERN int e_screensaver_shutdown(void);
|
||||||
|
|
||||||
EAPI void e_screensaver_update(void);
|
EAPI void e_screensaver_update(void);
|
||||||
|
EAPI void e_screensaver_force_update(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue