Set the SIZE info for creating a new livebox.
authorSung-jae Park <nicesj.park@samsung.com>
Thu, 11 Oct 2012 08:39:19 +0000 (17:39 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Thu, 11 Oct 2012 09:09:57 +0000 (18:09 +0900)
Requested by the OSP (to open this feature like android)

Change-Id: I6c87256cf4ebbb6db093ad0ab737683b30252e85

src/client.c

index c3c4e75..81ab6c6 100644 (file)
@@ -53,8 +53,18 @@ static int method_new(struct event_arg *arg, int *width, int *height, double *pr
                        &arg->info.lb_create.out_content,
                        &arg->info.lb_create.out_title);
 
-       if (ret == 0)
+       if (ret == 0) {
+               if (arg->info.lb_create.width > 0 && arg->info.lb_create.height > 0) {
+                       if (*width != arg->info.lb_create.width || *height != arg->info.lb_create.height) {
+                               int tmp;
+                               tmp = livebox_resize(arg->pkgname, arg->id, arg->info.lb_create.width, arg->info.lb_create.height);
+                               DbgPrint("Resize[%dx%d] returns: %d\n", arg->info.lb_create.width, arg->info.lb_create.height, tmp);
+                       }
+               }
+
+
                arg->info.lb_create.out_is_pinned_up = (livebox_is_pinned_up(arg->pkgname, arg->id) == 1);
+       }
 
        return ret;
 }