raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=5c8710ded38b0b70e9ff2548630116938757f1bc

commit 5c8710ded38b0b70e9ff2548630116938757f1bc
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sat Mar 1 08:04:09 2014 +0900

    fix screen blanking while fullscreen window is up - work again
    
    @fix - this fixes T1019 - when a window is fullscreen the display just
    NVER can blank no mater what. it's hrdcoded, and wrong to enforce. if
    an app wants to display screensaver - there is the xscreensaver extn -
    or maybe supporting an explicit property on a window would work
    better, but just equating fullscreen == never blank is wrong. it's an
    option now. off by default.
---
 src/bin/e_config.c                                  |  1 +
 src/bin/e_config.h                                  |  1 +
 src/bin/e_dpms.c                                    |  9 +++++----
 src/modules/conf_display/e_int_config_screensaver.c | 11 ++++++++++-
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/bin/e_config.c b/src/bin/e_config.c
index 75b8817..3ea38d6 100644
--- a/src/bin/e_config.c
+++ b/src/bin/e_config.c
@@ -597,6 +597,7 @@ _e_config_edd_init(Eina_Bool old)
    E_CONFIG_VAL(D, T, dpms_standby_timeout, INT);
    E_CONFIG_VAL(D, T, dpms_suspend_timeout, INT);
    E_CONFIG_VAL(D, T, dpms_off_timeout, INT);
+   E_CONFIG_VAL(D, T, no_dpms_on_fullscreen, UCHAR);
 
    E_CONFIG_VAL(D, T, clientlist_group_by, INT);
    E_CONFIG_VAL(D, T, clientlist_include_all_zones, INT);
diff --git a/src/bin/e_config.h b/src/bin/e_config.h
index ccf4e56..a60fab9 100644
--- a/src/bin/e_config.h
+++ b/src/bin/e_config.h
@@ -240,6 +240,7 @@ struct _E_Config
    int                       dpms_suspend_timeout; // GUI
    int                       dpms_off_enable; // GUI
    int                       dpms_off_timeout; // GUI
+   unsigned char             no_dpms_on_fullscreen; // GUI
 
    int                       clientlist_group_by; // GUI
    int                       clientlist_include_all_zones; // GUI
diff --git a/src/bin/e_dpms.c b/src/bin/e_dpms.c
index 866c903..ab87ee9 100644
--- a/src/bin/e_dpms.c
+++ b/src/bin/e_dpms.c
@@ -23,7 +23,8 @@ e_dpms_update(void)
 
    enabled = ((e_config->screensaver_enable) &&
               (!e_config->mode.presentation) &&
-              (!e_util_fullscreen_current_any()));
+              ((!e_util_fullscreen_current_any()) && 
(!e_config->no_dpms_on_fullscreen))
+             );
    if (_e_dpms_enabled != enabled)
      {
         _e_dpms_enabled = enabled;
@@ -88,21 +89,21 @@ _e_dpms_handler_config_mode_cb(void *data __UNUSED__, int 
type __UNUSED__, void
 static Eina_Bool
 _e_dpms_handler_border_fullscreen_check_cb(void *data __UNUSED__, int type 
__UNUSED__, void *event __UNUSED__)
 {
-   e_dpms_update();
+   if (e_config->no_dpms_on_fullscreen) e_dpms_update();
    return ECORE_CALLBACK_PASS_ON;
 }
 
 static Eina_Bool
 _e_dpms_handler_border_desk_set_cb(void *data __UNUSED__, int type __UNUSED__, 
void *event __UNUSED__)
 {
-   e_dpms_update();
+   if (e_config->no_dpms_on_fullscreen) e_dpms_update();
    return ECORE_CALLBACK_PASS_ON;
 }
 
 static Eina_Bool
 _e_dpms_handler_desk_show_cb(void *data __UNUSED__, int type __UNUSED__, void 
*event __UNUSED__)
 {
-   e_dpms_update();
+   if (e_config->no_dpms_on_fullscreen) e_dpms_update();
    return ECORE_CALLBACK_PASS_ON;
 }
 
diff --git a/src/modules/conf_display/e_int_config_screensaver.c 
b/src/modules/conf_display/e_int_config_screensaver.c
index e963ac2..2198740 100644
--- a/src/modules/conf_display/e_int_config_screensaver.c
+++ b/src/modules/conf_display/e_int_config_screensaver.c
@@ -30,6 +30,7 @@ struct _E_Config_Dialog_Data
 
    int wake_on_notify;
    int wake_on_urgent;
+   int no_dpms_on_fullscreen;
 
    struct 
      {
@@ -73,6 +74,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
 
    cfdata->wake_on_notify = e_config->screensaver_wake_on_notify;
    cfdata->wake_on_urgent = e_config->screensaver_wake_on_urgent;
+   cfdata->no_dpms_on_fullscreen = e_config->no_dpms_on_fullscreen;
 }
 
 static void *
@@ -127,6 +129,8 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, 
E_Config_Dialog_Data *cfdata)
         e_config->dpms_off_timeout = e_config->screensaver_timeout;
      }
    
+   e_config->no_dpms_on_fullscreen = cfdata->no_dpms_on_fullscreen;
+   
    /* Apply settings */
    e_screensaver_update();
    e_dpms_update();
@@ -146,7 +150,8 @@ _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, 
E_Config_Dialog_Data *cfda
           (e_config->screensaver_suspend_on_ac != 
cfdata->screensaver_suspend_on_ac) ||
           (e_config->screensaver_suspend_delay != 
cfdata->screensaver_suspend_delay) ||
           (e_config->screensaver_wake_on_notify != cfdata->wake_on_notify) ||
-          (e_config->screensaver_wake_on_urgent != cfdata->wake_on_urgent)
+          (e_config->screensaver_wake_on_urgent != cfdata->wake_on_urgent) ||
+           (e_config->dpms_off_timeout != cfdata->no_dpms_on_fullscreen)
     );
 }
 
@@ -188,6 +193,10 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, 
E_Config_Dialog_Data
    e_widget_check_widget_disable_on_unchecked_add(oc, ow);
    e_widget_list_object_append(ol, ow, 1, 1, 0.5);
    
+   oc = e_widget_check_add(evas, _("Disable blanking for Fullscreen Windows"),
+                           &(cfdata->no_dpms_on_fullscreen));
+   e_widget_list_object_append(ol, oc, 1, 1, 0.5);
+
    e_widget_toolbook_page_append(otb, NULL, _("Blanking"), ol, 
                                  1, 0, 1, 0, 0.5, 0.0);
 

-- 


Reply via email to