downstream: cosmetic changes (tabulation etc)
authorJanos Kovacs <jankovac503@gmail.com>
Thu, 27 Nov 2014 00:16:11 +0000 (02:16 +0200)
committerJanos Kovacs <jankovac503@gmail.com>
Wed, 10 Dec 2014 14:28:04 +0000 (16:28 +0200)
Change-Id: I93a53f8e96cce7a4239b6f5bcc3415dfe44eb65e
Signed-off-by: Janos Kovacs <jankovac503@gmail.com>
ivi-shell/ivi-shell-ext.c
ivi-shell/ivi-shell.c

index f436422..353ed1d 100644 (file)
@@ -139,17 +139,13 @@ subscribe_layout_surface_property_changes(struct shell_surface *shsurf)
     if (shsurf == NULL || shsurf->surface == NULL)
         return;
 
-    if (ivi_layout == NULL ||
-        ivi_layout->surface_find == NULL ||
-        ivi_layout->surface_add_notification == NULL)
+    if (ivi_layout == NULL || ivi_layout->surface_find == NULL || ivi_layout->surface_add_notification == NULL)
         return;
 
     ivisurf = ivi_layout->surface_find(shsurf->surface);
 
     if (ivisurf != NULL) {
-        ivi_layout->surface_add_notification(ivisurf,
-                                            layout_surface_poperty_changed,
-                                            (void *)shsurf);
+        ivi_layout->surface_add_notification(ivisurf, layout_surface_poperty_changed, (void *)shsurf);
     }
 }
 
@@ -162,9 +158,7 @@ unsubscribe_layout_surface_property_changes(struct shell_surface *shsurf)
     if (shsurf == NULL || shsurf->surface == NULL)
         return;
 
-    if (ivi_layout == NULL ||
-        ivi_layout->surface_find == NULL ||
-        ivi_layout->surface_remove_notification == NULL)
+    if (ivi_layout == NULL || ivi_layout->surface_find == NULL || ivi_layout->surface_remove_notification == NULL)
         return;
 
     ivisurf = ivi_layout->surface_find(shsurf->surface);
index afbbb80..3c0800d 100644 (file)
@@ -588,36 +588,38 @@ WL_EXPORT void
 get_wl_shell_info(struct ivi_layout_surface *layout_surface, uint32_t id_surface,
                   int32_t *pid_ret, const char **window_title_ret)
 {
-    struct weston_surface *surface;
-    struct wl_array shsurflist;
-    struct shell_surface **shsurface;
-    pid_t pid;
-    uid_t uid;
-    gid_t gid;
+       struct ivi_shell *shell = get_shell_instance();
+       struct ivi_layout_interface *ivi_layout = shell->ivi_layout;
+       struct weston_surface *surface;
+       struct wl_array shsurflist;
+       struct shell_surface **shsurface;
+       pid_t pid;
+       uid_t uid;
+       gid_t gid;
 
-    *pid_ret = 0;
-    *window_title_ret = "";
+       *pid_ret = 0;
+       *window_title_ret = "";
 
-    if (layout_surface != NULL && id_surface > 0) {
-      surface = get_shell_instance()->ivi_layout->get_weston_surface(layout_surface);
+       if (layout_surface != NULL && id_surface > 0) {
+               surface = ivi_layout->get_weston_surface(layout_surface);
 
-        if (surface != NULL && surface->resource != NULL && surface->resource->client != NULL) {
-            wl_client_get_credentials(surface->resource->client, &pid, &uid, &gid);
+               if (surface != NULL && surface->resource != NULL && surface->resource->client != NULL) {
+                       wl_client_get_credentials(surface->resource->client, &pid, &uid, &gid);
 
-            *pid_ret = pid;
+                       *pid_ret = pid;
 
-            ivi_shell_get_shell_surfaces(&shsurflist);
+                       ivi_shell_get_shell_surfaces(&shsurflist);
 
-            wl_array_for_each(shsurface, &shsurflist) {
-                if (surface == shell_surface_get_surface(*shsurface)) {
-                    *window_title_ret = shell_surface_get_title(*shsurface);
-                    break;
-                }
-            }
+                       wl_array_for_each(shsurface, &shsurflist) {
+                               if (surface == shell_surface_get_surface(*shsurface)) {
+                                       *window_title_ret = shell_surface_get_title(*shsurface);
+                                       break;
+                               }
+                       }
 
-            wl_array_release(&shsurflist);
-        }
-    }
+                       wl_array_release(&shsurflist);
+               }
+       }
 }
 
 /*