[metacity] stack: fix build warnings



commit 2fb2bf05974b5fb6f4998f5cf00224a58de63614
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Sep 20 18:02:47 2015 +0300

    stack: fix build warnings

 src/core/stack.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/core/stack.c b/src/core/stack.c
index cb6200f..26d965e 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -239,21 +239,20 @@ get_standalone_layer (MetaWindow *window)
   MetaStackLayer layer;
   gboolean focused_transient = FALSE;
 
-  switch (window->type)
+  if (window->type == META_WINDOW_DESKTOP)
     {
-    case META_WINDOW_DESKTOP:
       layer = META_LAYER_DESKTOP;
-      break;
-
-    case META_WINDOW_DOCK:
+    }
+  else if (window->type == META_WINDOW_DOCK)
+    {
       /* still experimenting here */
       if (window->wm_state_below)
         layer = META_LAYER_BOTTOM;
       else
         layer = META_LAYER_DOCK;
-      break;
-
-    default:
+    }
+  else
+    {
       meta_window_foreach_transient (window,
                                      is_focused_foreach,
                                      &focused_transient);
@@ -272,7 +271,6 @@ get_standalone_layer (MetaWindow *window)
         layer = META_LAYER_TOP;
       else
         layer = META_LAYER_NORMAL;
-      break;
     }
 
   return layer;


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