From: Hyunil Date: Fri, 26 Feb 2016 04:20:52 +0000 (+0900) Subject: apply getting fixed window width and height for window layout X-Git-Tag: accepted/tizen/common/20160229.160647~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F60413%2F1;p=platform%2Fcore%2Fapi%2Fplayer.git apply getting fixed window width and height for window layout Change-Id: I38cbc7054d8db63f7d8bf7564ee4868962a863b3 Signed-off-by: Hyunil --- diff --git a/src/player_internal.c b/src/player_internal.c index bb389fd..c255ca8 100644 --- a/src/player_internal.c +++ b/src/player_internal.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include "player_private.h" @@ -174,14 +175,27 @@ static void __evas_resize_cb (void *data, Evas *e, Evas_Object *eo, void *event_ wl_win_msg_type wl_win; char *wl_win_msg = (char *)&wl_win; char *ret_buf = NULL; + int rotation; + Ecore_Evas *ecore_evas; muse_player_api_e api = MUSE_PLAYER_API_RESIZE_VIDEO_RENDER_RECT; int ret = PLAYER_ERROR_NONE; LOGD("ret =%d",ret); evas_object_geometry_get(eo, &wl_win.wl_window_x, &wl_win.wl_window_y, &wl_win.wl_window_width, &wl_win.wl_window_height); + ecore_evas = ecore_evas_ecore_evas_get(e); + rotation = ecore_evas_rotation_get(ecore_evas); + LOGD("rotation(%d)",rotation); + LOGD("get window rectangle: x(%d) y(%d) width(%d) height(%d)", + wl_win.wl_window_x, wl_win.wl_window_y, wl_win.wl_window_width, wl_win.wl_window_height); + if (rotation == 270 || rotation == 90){ + LOGD("swap w and h"); + int temp; + temp = wl_win.wl_window_width; + wl_win.wl_window_width = wl_win.wl_window_height; + wl_win.wl_window_height = temp; + } LOGD("get window rectangle: x(%d) y(%d) width(%d) height(%d)", wl_win.wl_window_x, wl_win.wl_window_y, wl_win.wl_window_width, wl_win.wl_window_height); - wl_win.type = 0; /*init but not use */ wl_win.wl_surface_id = 0; /*init but not use */