[mutter/wip/wayland-kms: 25/39] MonitorXrandr: fix reading the current DPMS level



commit 2af20b77b6c8243292872e034947eb48f429c1b1
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Aug 21 19:07:01 2013 +0200

    MonitorXrandr: fix reading the current DPMS level
    
    Add missing break statements, to avoid falling always through
    to the invalid case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706582

 src/core/monitor-xrandr.c |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/src/core/monitor-xrandr.c b/src/core/monitor-xrandr.c
index 37dd4ca..1a66c13 100644
--- a/src/core/monitor-xrandr.c
+++ b/src/core/monitor-xrandr.c
@@ -337,18 +337,23 @@ meta_monitor_manager_xrandr_read_current (MetaMonitorManager *manager)
       dpms_enabled)
     {
       switch (dpms_state)
-       {
-       case DPMSModeOn:
-         manager->power_save_mode = META_POWER_SAVE_ON;
-       case DPMSModeStandby:
-         manager->power_save_mode = META_POWER_SAVE_STANDBY;
-       case DPMSModeSuspend:
-         manager->power_save_mode = META_POWER_SAVE_SUSPEND;
-       case DPMSModeOff:
-         manager->power_save_mode = META_POWER_SAVE_OFF;
-       default:
-         manager->power_save_mode = META_POWER_SAVE_UNKNOWN;
-       }
+        {
+        case DPMSModeOn:
+          manager->power_save_mode = META_POWER_SAVE_ON;
+          break;
+        case DPMSModeStandby:
+          manager->power_save_mode = META_POWER_SAVE_STANDBY;
+          break;
+        case DPMSModeSuspend:
+          manager->power_save_mode = META_POWER_SAVE_SUSPEND;
+          break;
+        case DPMSModeOff:
+          manager->power_save_mode = META_POWER_SAVE_OFF;
+          break;
+        default:
+          manager->power_save_mode = META_POWER_SAVE_UNKNOWN;
+          break;
+        }
     }
   else
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]