X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=frontend%2Fui%2Fsrc%2Frpm-homeview.c;h=0a127b1031491ce7092be34507748fbc80563438;hb=fd34fdf3be9fe380559a11786820b0b86c868ae7;hp=afc80ac69f8832980e84783f7b37d0d96383f6d9;hpb=78426f79987c45ebfad874edf7240d2703149576;p=platform%2Fcore%2Fbase%2Frpm-installer.git diff --git a/frontend/ui/src/rpm-homeview.c b/frontend/ui/src/rpm-homeview.c index afc80ac..0a127b1 100755 --- a/frontend/ui/src/rpm-homeview.c +++ b/frontend/ui/src/rpm-homeview.c @@ -21,8 +21,15 @@ */ #include -#include #include +#ifdef HAVE_X11 +#include +#endif +#ifdef HAVE_WAYLAND +#include +#include +#endif + #include "rpm-frontend.h" #include "rpm-installer-util.h" #include "rpm-homeview.h" @@ -158,6 +165,7 @@ Eina_Bool _ri_init_appdata(struct appdata *user_data) int x; int y; int count = 0; + int ret = 0; user_data->win_main = elm_win_add(NULL, PACKAGE, ELM_WIN_DIALOG_BASIC); if (!user_data->win_main) return EINA_FALSE; @@ -166,15 +174,20 @@ Eina_Bool _ri_init_appdata(struct appdata *user_data) elm_win_alpha_set(user_data->win_main, EINA_TRUE); elm_win_borderless_set(user_data->win_main, EINA_TRUE); elm_win_raise(user_data->win_main); +#ifdef HAVE_X11 ecore_x_window_geometry_get(ecore_x_window_root_get - (ecore_x_window_focus_get()), &x, &y, &w, - &h); - int ret = - ecore_x_window_prop_property_get(ecore_x_window_root_get - (ecore_x_window_focus_get()), - ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE, - ECORE_X_ATOM_CARDINAL, 32, - &prop_data, &count); + (ecore_x_window_focus_get()), &x, &y, &w, + &h); + ret = ecore_x_window_prop_property_get(ecore_x_window_root_get + (ecore_x_window_focus_get()), + ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, + &prop_data, &count); +#else /* HAVE_WAYLAND */ /* TO_DO_WAYLAND */ + _d_msg(DEBUG_INFO, "Operation not supported in a pure Wayland\ + environment. To do: replace the X11 dependant functions with\ + Wayland compatible ones.\n"); +#endif if (ret && prop_data) memcpy(&rotation, prop_data, sizeof(int)); if (prop_data)