wl-desktop-shell: Avoid runtime ERR noise for something that is not
authorChris Michael <cp.michael@samsung.com>
Thu, 24 Jul 2014 18:34:36 +0000 (14:34 -0400)
committerChris Michael <cp.michael@samsung.com>
Tue, 26 Aug 2014 14:10:38 +0000 (10:10 -0400)
really an error.

When we call shell_surface_parent_set with a NULL parent resource,
then there is No reason to try and find the pixmap window of a NULL
parent. Avoid that function call and just set the appropriate
properties and get out.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/wl_desktop_shell/e_mod_main.c

index 1548bb6..0e77dd9 100644 (file)
@@ -11,8 +11,13 @@ _e_shell_surface_parent_set(E_Client *ec, struct wl_resource *parent_resource)
    E_Client *pc;
    uint64_t pwin = 0;
 
-   if (!parent_resource) pp = NULL;
-   /* get pixmap from parent */
+   if (!parent_resource)
+     {
+        ec->icccm.fetch.transient_for = EINA_FALSE;
+        ec->icccm.transient_for = 0;
+        ec->parent = NULL;
+        return;
+     }
    else if (!(pp = wl_resource_get_user_data(parent_resource)))
      {
         ERR("Could not get parent resource pixmap");