[mutter] x11/events: Fly-by coding style cleanup



commit 6c7765439f431985fdfd7f2d5fdb5b6f9aae7320
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Feb 2 23:42:53 2021 +0100

    x11/events: Fly-by coding style cleanup
    
    A large else block didn't have {}, so added them.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1700>

 src/x11/events.c | 45 ++++++++++++++++++++++-----------------------
 1 file changed, 22 insertions(+), 23 deletions(-)
---
diff --git a/src/x11/events.c b/src/x11/events.c
index efc34bfbeb..e2297767ed 100644
--- a/src/x11/events.c
+++ b/src/x11/events.c
@@ -676,29 +676,28 @@ meta_spew_core_event (MetaX11Display *x11_display,
                              alarm_state_to_string (aevent->state));
         }
       else
-        if (META_X11_DISPLAY_HAS_SHAPE (x11_display) &&
-            event->type == (x11_display->shape_event_base + ShapeNotify))
-          {
-            XShapeEvent *sev = (XShapeEvent*) event;
-
-            name = "ShapeNotify";
-
-            extra =
-              g_strdup_printf ("kind: %s "
-                               "x: %d y: %d w: %u h: %u "
-                               "shaped: %d",
-                               sev->kind == ShapeBounding ?
-                               "ShapeBounding" :
-                               (sev->kind == ShapeClip ?
-                                "ShapeClip" : "(unknown)"),
-                               sev->x, sev->y, sev->width, sev->height,
-                               sev->shaped);
-          }
-        else
-          {
-            name = "(Unknown event)";
-            extra = g_strdup_printf ("type: %d", event->xany.type);
-          }
+        {
+          if (META_X11_DISPLAY_HAS_SHAPE (x11_display) &&
+              event->type == (x11_display->shape_event_base + ShapeNotify))
+            {
+              XShapeEvent *sev = (XShapeEvent*) event;
+
+              extra =
+                g_strdup_printf ("kind: %s "
+                                 "x: %d y: %d w: %u h: %u "
+                                 "shaped: %d",
+                                 sev->kind == ShapeBounding ?
+                                 "ShapeBounding" :
+                                 (sev->kind == ShapeClip ?
+                                  "ShapeClip" : "(unknown)"),
+                                 sev->x, sev->y, sev->width, sev->height,
+                                 sev->shaped);
+            }
+          else
+            {
+              extra = g_strdup_printf ("type: %d", event->xany.type);
+            }
+        }
       break;
     }
 


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