IF(DECRYPT_SUPPORT)
ADD_DEFINITIONS("-DDECRYPT")
ENDIF(DECRYPT_SUPPORT)
+OPTION(X11_SUPPORT "Enable X11" ON)
+IF(X11_SUPPORT)
+ ADD_DEFINITIONS("-DX11")
+ENDIF(X11_SUPPORT)
IF(CSP_SUPPORT)
ADD_DEFINITIONS("-DCSP_ENABLED")
ENDIF(CSP_SUPPORT)
-DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
%if %{with wayland}
-DDECRYPT_SUPPORT=Off \
+ -DX11_SUPPORT=Off \
%else
-DDECRYPT_SUPPORT=On \
+ -DX11_SUPPORT=On \
%endif
%{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS}
security-client
)
-
+IF(X11_SUPPORT)
SET(SYS_WRT_BASIC_DEP
openssl
libpcrecpp
secure-storage
app2sd
)
+ELSE(X11_SUPPORT)
+SET(SYS_WRT_BASIC_DEP
+ openssl
+ libpcrecpp
+ glib-2.0
+ gthread-2.0
+ libsoup-2.4
+ libiri
+ appsvc
+ cert-svc-vcore
+ edje
+ ecore
+ ecore-wayland
+ evas
+ eina
+ ewebkit2
+ elementary
+ vconf
+ cert-svc
+ ui-gadget-1
+ secure-storage
+ app2sd
+)
+ENDIF(X11_SUPPORT)
IF(SMACK_ENABLED)
LIST(APPEND SYS_WRT_BASIC_DEP libprivilege-control)
void setWebProcessPidWindowProperty(unsigned int window, unsigned int pid)
{
+#ifdef X11
ecore_x_window_prop_property_set(
window,
ecore_x_atom_get(XWINDOW_WEBPROCESS_PID_PROPERTY_NAME),
ECORE_X_ATOM_CARDINAL, 32, &pid, 1);
+#endif
}
unsigned int checkProperty(int pid, Display* display, Window window, Atom atom)
{
+#ifdef X11
Atom type;
int format;
unsigned long count;
}
XFree(propPID);
}
+#endif
return 0;
}
unsigned int XWindowIterate(int pid, Display* display, Window window)
{
+#ifdef X11
Atom atomPID = XInternAtom(display, XWINDOW_PID_PROPERTY_NAME, True);
Atom atomPIDWP = XInternAtom(display, XWINDOW_WEBPROCESS_PID_PROPERTY_NAME, True);
unsigned int result = checkProperty(pid, display, window, atomPID);
XFree(children);
return result;
+#else
+ return 0;
+#endif
}
std::string commandLineByPid(int pid)
unsigned int xWindowByPid(int pid)
{
+#ifdef X11
Display *display = XOpenDisplay(NULL);
if (!display) {
LogError("XOpenDisplay failed");
int screen = DefaultScreen(display);
Window rootWindow = RootWindow(display, screen);
return XWindowIterate(pid, display, rootWindow);
+#else
+ return 0;
+#endif
}
std::string mime(bundle *b)
}
-#endif
\ No newline at end of file
+#endif
#include <ui-gadget.h>
#include <dpl/log/log.h>
+#ifndef X11
+#include <Ecore_Wayland.h>
+#endif
+
namespace {
char const* const PLATFORM_EDJ_PATH = "/usr/share/edje/wrt/Platform.edj";
char const* const DAEMON_EDJ_PATH = "/usr/share/edje/wrt/Daemon.edj";
m_user_layout = createUserLayout(m_navigation);
evas_object_show(m_user_layout);
+#ifdef X11
UG_INIT_EFL(m_win, UG_OPT_INDICATOR_ENABLE);
+#endif
m_initialized = true;
}
Evas_Object* WindowData::createWindow(unsigned long pid)
{
+ int w, h;
ADD_PROFILING_POINT("elm_win_add", "start");
Evas_Object* window = elm_win_add(NULL, "wrt-widget", ELM_WIN_BASIC);
ADD_PROFILING_POINT("elm_win_add", "stop");
+#ifdef X11
ecore_x_window_prop_property_set(
elm_win_xwindow_get(window),
ECORE_X_ATOM_NET_WM_PID,
ECORE_X_ATOM_CARDINAL, 32, &pid, 1);
elm_win_conformant_set(window, EINA_TRUE);
- int w, h;
ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
+#else
+ ecore_wl_screen_size_get(&w, &h);
+#endif
evas_object_resize(window, w, h);
evas_object_smart_callback_add(window,