X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Flivebox.c;h=d880101de2be785fef707437adef549be5842bb9;hb=28f2a078174b439987b3ffafd28c30a783d5cb08;hp=845e93476d656d9cc87d3b862ac7d927fbb669d6;hpb=2b8c2dd0cebd7598ad6abd154067a4238f6e4b51;p=platform%2Fframework%2Fweb%2Flivebox-viewer.git diff --git a/src/livebox.c b/src/livebox.c index 845e934..d880101 100644 --- a/src/livebox.c +++ b/src/livebox.c @@ -1248,17 +1248,13 @@ EAPI int livebox_get_pdsize(struct livebox *handler, int *w, int *h) if (!h) h = &_h; - *w = handler->pd.width; - *h = handler->pd.height; - - switch (handler->pd.type) { - case _PD_TYPE_BUFFER: - case _PD_TYPE_SCRIPT: - if (!handler->is_pd_created) - DbgPrint("Buffer is not created yet [%dx%d]\n", *w, *h); - break; - default: - break; + if (!handler->is_pd_created) { + DbgPrint("Buffer is not created yet [%dx%d]\n", *w, *h); + *w = handler->pd.default_width; + *h = handler->pd.default_height; + } else { + *w = handler->pd.width; + *h = handler->pd.height; } return 0; @@ -2149,6 +2145,12 @@ void lb_set_pdsize(struct livebox *handler, int w, int h) handler->pd.height = h; } +void lb_set_default_pdsize(struct livebox *handler, int w, int h) +{ + handler->pd.default_width = w; + handler->pd.default_height = h; +} + void lb_invoke_fault_handler(enum livebox_fault_type event, const char *pkgname, const char *file, const char *func) { struct dlist *l;