Use wl_resource_* error functions
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 1 Sep 2011 13:54:57 +0000 (09:54 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 1 Sep 2011 13:54:57 +0000 (09:54 -0400)
compositor/compositor.c
compositor/meego-tablet-shell.c
compositor/shell.c

index 07de2c5..c7099f0 100644 (file)
@@ -1088,7 +1088,7 @@ surface_frame(struct wl_client *client,
 
        cb = malloc(sizeof *cb);
        if (cb == NULL) {
-               wl_client_post_no_memory(client);
+               wl_resource_post_no_memory(resource);
                return;
        }
                
@@ -1171,7 +1171,7 @@ compositor_create_surface(struct wl_client *client,
 
        surface = wlsc_surface_create(ec, 0, 0, 0, 0);
        if (surface == NULL) {
-               wl_client_post_no_memory(client);
+               wl_resource_post_no_memory(resource);
                return;
        }
 
index 908f53e..450888b 100644 (file)
@@ -435,7 +435,7 @@ tablet_shell_create_client(struct wl_client *client,
 
        tablet_client = malloc(sizeof *tablet_client);
        if (tablet_client == NULL) {
-               wl_client_post_no_memory(client);
+               wl_resource_post_no_memory(resource);
                return;
        }
 
index f4942a2..cdc9e0a 100644 (file)
@@ -112,7 +112,7 @@ shell_move(struct wl_client *client, struct wl_resource *resource,
        struct wlsc_surface *es = surface_resource->data;
 
        if (wlsc_surface_move(es, wd, time) < 0)
-               wl_client_post_no_memory(client);
+               wl_resource_post_no_memory(resource);
 }
 
 struct wlsc_resize_grab {
@@ -256,7 +256,7 @@ shell_resize(struct wl_client *client, struct wl_resource *resource,
        /* FIXME: Reject if fullscreen */
 
        if (wlsc_surface_resize(es, wd, time, edges, resource) < 0)
-               wl_client_post_no_memory(client);
+               wl_resource_post_no_memory(resource);
 }
 
 static void
@@ -452,7 +452,7 @@ drag_offer(struct wl_client *client,
        if (p)
                *p = strdup(type);
        if (!p || !*p)
-               wl_client_post_no_memory(client);
+               wl_resource_post_no_memory(resource);
 }
 
 static void
@@ -568,7 +568,7 @@ shell_create_drag(struct wl_client *client,
 
        drag = malloc(sizeof *drag);
        if (drag == NULL) {
-               wl_client_post_no_memory(client);
+               wl_resource_post_no_memory(resource);
                return;
        }
 
@@ -655,7 +655,7 @@ selection_offer(struct wl_client *client,
        if (p)
                *p = strdup(type);
        if (!p || !*p)
-               wl_client_post_no_memory(client);
+               wl_resource_post_no_memory(resource);
 }
 
 static void
@@ -736,7 +736,7 @@ shell_create_selection(struct wl_client *client,
 
        selection = malloc(sizeof *selection);
        if (selection == NULL) {
-               wl_client_post_no_memory(client);
+               wl_resource_post_no_memory(resource);
                return;
        }