From: Hyungdeuk Kim Date: Mon, 1 Jul 2013 11:41:25 +0000 (+0900) Subject: apply new window rotation guide (e17-extra) X-Git-Tag: submit/tizen/20140502.084904~11 X-Git-Url: http://review.tizen.org/git/?p=apps%2Fcore%2Fpreloaded%2Fapp-selector.git;a=commitdiff_plain;h=268df789d97705be09afe027f69c56a8d342072f apply new window rotation guide (e17-extra) Change-Id: I231ee146a64c44ec55255e56df4439359ce89eb5 --- diff --git a/app-selector.c b/app-selector.c index fdd4649..2e66fd7 100755 --- a/app-selector.c +++ b/app-selector.c @@ -30,6 +30,8 @@ #include "app-selector-view.h" #include "app-selector-util.h" +#define WIN_PROP_NAME "APP_SELECTOR" + #ifndef EXPORT_API #define EXPORT_API __attribute__ ((visibility("default"))) #endif @@ -79,8 +81,6 @@ static Evas_Object *__create_layout_main(Evas_Object * parent) evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - edje_object_signal_emit(_EDJ(layout), "elm,state,show,indicator", - "elm"); edje_object_signal_emit(_EDJ(layout), "elm,state,show,content", "elm"); evas_object_show(layout); @@ -125,7 +125,7 @@ static int __get_window_property(Display *dpy, Window win, Atom atom, return num; } - +#ifdef ROTATE_USING_X_CLIENT static int __x_rotation_get(Display *dpy, Window win) { Window active_win; @@ -143,9 +143,6 @@ static int __x_rotation_get(Display *dpy, Window win) XA_WINDOW, (unsigned int *)&active_win, 1); - /*printf("[SYSPOPUP] Active win : %x, Window %x\n", active_win, win);*/ - - /*active_win = get_active_win(dpy, root_win, atom_active_win);*/ if (ret < 0) return ret; @@ -155,8 +152,6 @@ static int __x_rotation_get(Display *dpy, Window win) atom_win_rotate_angle, XA_CARDINAL, (unsigned int *)&rotation, 1); - /*printf("[SYSPOPUP] Rotation %d\n", rotation);*/ - if (ret != -1) return rotation; @@ -196,6 +191,7 @@ static Eina_Bool __rotate(void *data, int type, void *event) return 0; } +#endif static Eina_Bool s_key_registered; @@ -303,24 +299,26 @@ static int __app_create(void *data) if (!ly) return -1; - edje_object_signal_emit(_EDJ(ly), "elm,bg,show,transparent", "elm"); + ad->layout = ly; - elm_win_resize_object_add(win, ly); + edje_object_signal_emit(_EDJ(ly), "elm,bg,show,transparent", "elm"); ad->dpy = ecore_x_display_get(); ad->xwin = elm_win_xwindow_get(win); -#ifdef ROTATE_ACTIVE_WIN +#ifdef ROTATE_USING_X_CLIENT ad->rotate = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, __rotate, (void *)ad); - __as_rotate(ad->dpy, ad->xwin, win, ad); #else - if (elm_win_wm_rotation_supported_get(win)) - { + ecore_x_icccm_name_class_set(ad->xwin, WIN_PROP_NAME, WIN_PROP_NAME); + if (elm_win_wm_rotation_supported_get(ad->win)) { int rots[4] = { 0, 90, 180, 270 }; - elm_win_wm_rotation_available_rotations_set(win, (const int*)&rots, 4); + elm_win_wm_rotation_available_rotations_set(ad->win, &rots, 4); + } else { + _E("win rotation no supported"); } #endif + evas_object_show(win); /* init internationalization */ diff --git a/packaging/org.tizen.app-selector.spec b/packaging/org.tizen.app-selector.spec index d468c74..bf34576 100755 --- a/packaging/org.tizen.app-selector.spec +++ b/packaging/org.tizen.app-selector.spec @@ -1,7 +1,7 @@ Name: org.tizen.app-selector Summary: Application selector Version: 0.1.0 -Release: 92 +Release: 94 Group: TO_BE/FILLED_IN License: Flora Software License Source0: %{name}-%{version}.tar.gz