apply new window rotation guide (e17-extra) 81/17881/3
authorHyungdeuk Kim <hd3.kim@samsung.com>
Mon, 1 Jul 2013 11:41:25 +0000 (20:41 +0900)
committerInkyun Kil <inkyun.kil@samsung.com>
Wed, 12 Mar 2014 05:16:59 +0000 (14:16 +0900)
Change-Id: I231ee146a64c44ec55255e56df4439359ce89eb5

app-selector.c
packaging/org.tizen.app-selector.spec

index fdd4649..2e66fd7 100755 (executable)
@@ -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 */
index d468c74..bf34576 100755 (executable)
@@ -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