link_directories (${COMMCLIENT_LIBRARY_DIRS})
include_directories (${COMMCLIENT_INCLUDE_DIRS})
-pkg_check_modules(APPCODEEFL appcore-efl evas ecore edje ecore-input ecore-x)
+IF(X11_SUPPORT)
+ SET(WIN_PKG "ecore-x")
+ENDIF(X11_SUPPORT)
+IF(WAYLAND_SUPPORT)
+ SET(WIN_PKG "${WIN_PKG} ecore-wayland")
+ENDIF(WAYLAND_SUPPORT)
+pkg_check_modules(APPCODEEFL appcore-efl evas ecore edje ecore-input ${WIN_PKG})
link_directories (${APPCODEEFL_LIBRARY_DIRS})
include_directories (${APPCODEEFL_INCLUDE_DIRS})
include_directories (${SECURITYSERVER_INCLUDE_DIRS})
## DEFINITIONS
+
+IF(WAYLAND_SUPPORT)
+ ADD_DEFINITIONS("-DHAVE_WAYLAND")
+ENDIF(WAYLAND_SUPPORT)
+
+IF(X11_SUPPORT)
+ ADD_DEFINITIONS("-DHAVE_X11")
+ENDIF(X11_SUPPORT)
+
ADD_DEFINITIONS("-DAPP_DIR=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DPACKAGE=\"${PROJECT_NAME}\"")
*/
#include <appcore-efl.h>
-#include <Ecore_X.h>
#include <pthread.h>
+#if HAVE_X11
+#include <Ecore_X.h>
+#endif
+#if HAVE_WAYLAND
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+#endif
+
#include "rpm-frontend.h"
#include "rpm-installer-util.h"
#include "rpm-homeview.h"
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;
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);
+#if 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);
+#elseif 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)
+%bcond_with wayland
%bcond_with x
Name: rpm-installer
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: gettext-tools
%if %{with x}
-BuildRequires: pkgconfig(ecore-x)
-%else
-ExclusiveArch:
+BuildRequires: pkgconfig(ecore-x)
+%endif
+%if %{with wayland}
+BuildRequires: pkgconfig(ecore-wayland)
%endif
Requires: cpio
%build
CFLAGS+=" -fpic"
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+%if %{with wayland}
+ -DWAYLAND_SUPPORT=On \
+%else
+ -DWAYLAND_SUPPORT=Off \
+%endif
+%if %{with x}
+ -DX11_SUPPORT=On
+%else
+ -DX11_SUPPORT=Off
+%endif
make %{?jobs:-j%jobs}