ecore-wayland: Check for valid shell before sending bound event
authorChris Michael <cp.michael@samsung.com>
Thu, 21 Aug 2014 17:14:20 +0000 (13:14 -0400)
committerChris Michael <cp.michael@samsung.com>
Wed, 1 Oct 2014 20:15:37 +0000 (16:15 -0400)
We could have either wl_shell OR xdg_shell, so check if we have either
one before dispatching the interfaces_bound event.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wayland/ecore_wl.c

index 68b0a19..754ac04 100644 (file)
@@ -75,7 +75,6 @@ static const struct xdg_shell_listener xdg_shell_listener =
    xdg_shell_ping,
 };
 
-
 /* external variables */
 int _ecore_wl_log_dom = -1;
 Ecore_Wl_Display *_ecore_wl_disp = NULL;
@@ -674,7 +673,8 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
           wl_registry_bind(registry, id, &wl_data_device_manager_interface, 1);
      }
 
-   if ((ewd->wl.compositor) && (ewd->wl.shm) && (ewd->wl.shell))
+   if ((ewd->wl.compositor) && (ewd->wl.shm) && 
+       ((ewd->wl.shell) || (ewd->wl.xdg_shell)))
      {
         Ecore_Wl_Event_Interfaces_Bound *ev;
 
@@ -683,7 +683,7 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
 
         ev->compositor = (ewd->wl.compositor != NULL);
         ev->shm = (ewd->wl.shm != NULL);
-        ev->shell = (ewd->wl.shell != NULL);
+        ev->shell = ((ewd->wl.shell != NULL) || (ewd->wl.xdg_shell != NULL));
         ev->output = (ewd->output != NULL);
         ev->seat = (ewd->input != NULL);
         ev->data_device_manager = (ewd->wl.data_device_manager != NULL);