Hi pq,

I applied your comments except for several ones,

+    struct ivi_shell *shell = wl_resource_get_user_data(resource);
+    struct ivi_shell_surface *ivisurf = NULL;
+    struct weston_layout_surface *layout_surface = NULL;
+ struct weston_surface *es = wl_resource_get_user_data(surface_resource);
+    struct wl_resource *res;
+    int32_t warn_idx = -1;
+
+    if (es != NULL) {
+        layout_surface = weston_layout_surfaceCreate(es, id_surface);
+        if (layout_surface == NULL)
+            warn_idx = 1;
+    } else {
+        warn_idx = 0;

I think this case would be a compositor internal error, not a client
error. Userdata of a surface resource should never be NULL. I.e.
assert() kind of thing would be more approriate.


I expect it would send warning to client. So I implement it like the above.


+    init_ivi_shell(ec, shell);
+    weston_layout_initWithCompositor(ec);
+
+    shell->destroy_listener.notify = shell_destroy;
+    wl_signal_add(&ec->destroy_signal, &shell->destroy_listener);
+
+ if (wl_global_create(ec->wl_display, &ivi_application_interface, 1,
+                         shell, bind_ivi_application) == NULL) {
+        return -1;
+    }

You are not setting compositor->shell_interface, but OTOH those are
only used for Xwayland, which probably doesn't make sense here.

I was advised by kritian before it shall not support other shell in ivi-shell at the same time.

BR,
Nobuhiko


+
+    return 0;
+}


Thanks,
pq

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to