Do without odeviced for the display
authorEnrico Zini <enrico@enricozini.org>
Mon, 28 Sep 2009 14:51:22 +0000 (15:51 +0100)
committerEnrico Zini <enrico@enricozini.org>
Mon, 28 Sep 2009 14:51:22 +0000 (15:51 +0100)
src/app_power.vala
src/config.vala

index e58fe600cb1d86ae8b96a607535b6356ee8b257c..6a3533e2683f1509ec06e62787ddefaa5f03e16f 100644 (file)
@@ -361,7 +361,6 @@ public class RebootButton : Gtk.Button
 public class Backlight: zavai.Service
 {
        public dynamic DBus.Object usage;
-       public dynamic DBus.Object display;
 
        public Backlight()
        {
@@ -371,11 +370,6 @@ public class Backlight: zavai.Service
                        "org.freesmartphone.ousaged",
                        "/org/freesmartphone/Usage",
                        "org.freesmartphone.Usage");
-
-               display = zavai.registry.sbus.get_object(
-                       "org.freesmartphone.odeviced",
-                       "/org/freesmartphone/Device/Display/0",
-                       "org.freesmartphone.Device.Display");
        }
 
        // Turn the backlight and then let it fade off
@@ -383,7 +377,7 @@ public class Backlight: zavai.Service
        {
                // There must be a better method
                try {
-                       display.SetBacklightPower(true);
+                       //display.SetBacklightPower(true);
                        //usage.SetResourcePolicy("Display", "auto");
                        usage.RequestResource("Display");
                        usage.ReleaseResource("Display");
@@ -397,8 +391,8 @@ public class Backlight: zavai.Service
                if (!started)
                {
                        try {
-                               display.SetBacklightPower(false);
-                               zavai.app.run_script(zavai.config.xset_dpms_short_wait);
+                               //display.SetBacklightPower(false);
+                               zavai.app.run_script(zavai.config.xset_dpms_turn_off);
                                /*
                                string policy = usage.GetResourcePolicy("Display");
                                if (policy == "auto")
@@ -415,7 +409,7 @@ public class Backlight: zavai.Service
        public void unlock_screen()
        {
                try {
-                       display.SetBacklightPower(true);
+                       //display.SetBacklightPower(true);
                        zavai.app.run_script(zavai.config.xset_dpms_long_wait);
                        //usage.SetResourcePolicy("Display", "auto");
                } catch (GLib.Error e) {
index b7488f4d789326649495eeee14332e6dc6791699..42617790b6bef3486c6a42fad6981691eae45a3c 100644 (file)
@@ -39,9 +39,9 @@ public class Config
         icondir = "./icons";
         min_button_height = 80;
        xset_dpms_always_on = "xset dpms force on; xset dpms 0 0 0";
-       xset_dpms_turn_off = "xset dpms force off";
-       xset_dpms_long_wait = "xset dpms 0 0 30";
-       xset_dpms_short_wait = "xset dpms 0 0 5";
+       xset_dpms_turn_off = "xset dpms force off; xset dpms 0 0 5";
+       xset_dpms_long_wait = "xset dpms force on; xset dpms 0 0 30";
+       xset_dpms_short_wait = "xset dpms force on; xset dpms 0 0 5";
     }
 
 /*