${CMAKE_SOURCE_DIR}/res )
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED
+SET(PKGS_CHECK_MODULES
elementary
feedback
sensor
dlog
ecore-imf
libxml-2.0
- utilX
tts
vconf
)
+IF (with_x)
+ pkg_check_modules(pkgs REQUIRED ${PKGS_CHECK_MODULES} utilX)
+ENDIF(with_x)
+
+IF (with_wayland)
+ ADD_DEFINITIONS("-DWAYLAND")
+ pkg_check_modules(pkgs REQUIRED ${PKGS_CHECK_MODULES})
+ENDIF(with_wayland)
+
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
+%bcond_with x
+%bcond_with wayland
+
%define _optdir /opt
%define _appdir %{_optdir}/apps
BuildRequires: gettext-tools
BuildRequires: cmake
BuildRequires: pkgconfig(elementary)
+%if %{with wayland}
+%else
BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(x11)
+%endif
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(feedback)
BuildRequires: pkgconfig(sensor)
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(tts)
CXXFLAGS+=" -D_TV";
%endif
+%if %{with wayland}
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir} -Dwith_wayland=TRUE
+%else
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir}
+%endif
make %{?jobs:-j%jobs}
%install
#include "sclres_manager.h"
#include <Elementary.h>
-#include <Ecore_X.h>
#include <dlog.h>
+#ifdef WAYLAND
+#include <Ecore_Wayland.h>
+#else
+#include <Ecore_X.h>
#include <utilX.h>
+#endif
#include "sclkeyfocushandler.h"
m_mouse_move_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, mouse_move, NULL);
m_mouse_up_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, mouse_release, NULL);
+#ifndef WAYLAND
m_xclient_msg_handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, client_message_cb, NULL);
+#endif
#ifdef HANDLE_KEY_EVENTS
m_key_pressed_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, key_pressed, NULL);
#endif
Eina_Bool mouse_press(void *data, int type, void *event_info)
{
SCL_DEBUG();
+#ifdef WAYLAND
+ Ecore_Wl_Window *wl_base_window;
+ Ecore_Wl_Window *wl_magnifier_window;
+ Ecore_Wl_Window *wl_window;
+#endif
Evas_Event_Mouse_Down *ev1 = (Evas_Event_Mouse_Down*)event_info;
LOGD("mouse_press : %d %d\n", ev1->output.x, ev1->output.y);
sclboolean processed = FALSE;
sclwindow window = SCLWINDOW_INVALID;
+#ifndef WAYLAND
Ecore_X_Window inputWindow = 0;
Ecore_X_Atom inputAtom = ecore_x_atom_get ("DeviceMgr Input Window");
ecore_x_window_prop_xid_get (ecore_x_window_root_first_get(),
adjustment->enable_touch_offset(FALSE);
}
}
-
+#endif
sclboolean is_scl_window = FALSE;
+#ifdef WAYLAND
+ sclwindow evwin = (sclwindow)(ev->window);
+ wl_base_window = elm_win_wl_window_get(static_cast<Evas_Object*>(windows->get_base_window()));
+ if (wl_base_window) {
+ if ((unsigned int)ecore_wl_window_id_get(wl_base_window) == ev->window)
+ is_scl_window = TRUE;
+ } else if ((wl_magnifier_window = (elm_win_wl_window_get(static_cast<Evas_Object*>(windows->get_magnifier_window()))))) {
+ if ((unsigned int)ecore_wl_window_id_get(wl_magnifier_window) == ev->window)
+ is_scl_window = TRUE;
+#else
if (elm_win_xwindow_get(static_cast<Evas_Object*>(windows->get_base_window())) == ev->window) {
is_scl_window = TRUE;
} else if (elm_win_xwindow_get(static_cast<Evas_Object*>(windows->get_magnifier_window())) == ev->window) {
is_scl_window = TRUE;
+#endif
} else {
do {
window = windows->get_nth_window_in_Z_order_list(index);
if (window_context) {
if (window_context->is_virtual) {
is_scl_window = TRUE;
+#ifdef WAYLAND
+ } else if ((wl_window = elm_win_wl_window_get(static_cast<Evas_Object*>(window)))) {
+ if ((unsigned int)ecore_wl_window_id_get(wl_window) == ev->window)
+ is_scl_window = TRUE;
+#else
} else if (elm_win_xwindow_get(static_cast<Evas_Object*>(window)) == ev->window) {
is_scl_window = TRUE;
+#endif
}
}
index++;
if (window_context) {
windows->get_window_rect(window, &(window_context->geometry));
if (get_window_rect(window, &rect)) {
+#ifdef WAYLAND
+ int adjustx = ev->x;
+ int adjusty = ev->y;
+#else
int adjustx = ev->root.x;
int adjusty = ev->root.y;
+#endif
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
PSclDefaultConfigure default_configure = NULL;
if (process_event)
{
// Now convert the global coordinate to appropriate local coordinate
+#ifdef WAYLAND
+ SclPoint coords = get_rotated_local_coords(ev->x, ev->y, context->get_rotation(), &rect);
+#else
SclPoint coords = get_rotated_local_coords(ev->root.x, ev->root.y, context->get_rotation(), &rect);
+#endif
controller->mouse_press(window, coords.x, coords.y, ev->multi.device);
mouse_pressed = TRUE;
processed = TRUE;
}
// Now convert the global coordinate to appropriate local coordinate
+#ifdef WAYLAND
+ SclPoint coords = get_rotated_local_coords(ev->x, ev->y, context->get_rotation(), &rect);
+#else
SclPoint coords = get_rotated_local_coords(ev->root.x, ev->root.y, context->get_rotation(), &rect);
+#endif
controller->mouse_press(window, coords.x, coords.y, ev->multi.device);
mouse_pressed = TRUE;
processed = TRUE;
}
}
if (dimwinevent) {
+#ifdef WAYLAND
+ controller->mouse_press(windows->get_dim_window(), ev->x, ev->y, ev->multi.device);
+#else
controller->mouse_press(windows->get_dim_window(), ev->root.x, ev->root.y, ev->multi.device);
+#endif
} else {
do {
window = windows->get_nth_window_in_Z_order_list(index);
if (window_context) {
windows->get_window_rect(window, &(window_context->geometry));
if (get_window_rect(window, &rect)) {
+#ifdef WAYLAND
+ int adjustx = ev->x;
+ int adjusty = ev->y;
+#else
int adjustx = ev->root.x;
int adjusty = ev->root.y;
+#endif
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
PSclDefaultConfigure default_configure = NULL;
if (process_event)
{
/* Now convert the global coordinate to appropriate local coordinate */
+#ifdef WAYLAND
+ SclPoint coords = get_rotated_local_coords(ev->x, ev->y, context->get_rotation(), &rect);
+#else
SclPoint coords = get_rotated_local_coords(ev->root.x, ev->root.y, context->get_rotation(), &rect);
+#endif
controller->mouse_release(window, coords.x, coords.y, ev->multi.device);
processed = TRUE;
}
}
/* Now convert the global coordinate to appropriate local coordinate */
+#ifdef WAYLAND
+ SclPoint coords = get_rotated_local_coords(ev->x, ev->y, context->get_rotation(), &rect);
+#else
SclPoint coords = get_rotated_local_coords(ev->root.x, ev->root.y, context->get_rotation(), &rect);
+#endif
controller->mouse_release(window, coords.x, coords.y, ev->multi.device);
processed = TRUE;
}
rect.height = winwidth;
rect.width = winheight;
}
+#ifdef WAYLAND
+ SclPoint coords = get_rotated_local_coords(ev->x, ev->y, context->get_rotation(), &rect);
+#else
SclPoint coords = get_rotated_local_coords(ev->root.x, ev->root.y, context->get_rotation(), &rect);
+#endif
controller->mouse_move(context->get_cur_pressed_window(ev->multi.device), coords.x, coords.y, ev->multi.device);
processed = TRUE;
if (window_context) {
windows->get_window_rect(window, &(window_context->geometry));
if (get_window_rect(window, &rect)) {
+#ifdef WAYLAND
+ int adjustx = ev->x;
+ int adjusty = ev->y;
+#else
int adjustx = ev->root.x;
int adjusty = ev->root.y;
+#endif
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
PSclDefaultConfigure default_configure = NULL;
if (process_event)
{
/* Now convert the global coordinate to appropriate local coordinate */
+#ifdef WAYLAND
+ SclPoint coords = get_rotated_local_coords(ev->x, ev->y, context->get_rotation(), &rect);
+#else
SclPoint coords = get_rotated_local_coords(ev->root.x, ev->root.y, context->get_rotation(), &rect);
+#endif
controller->mouse_move(window, coords.x, coords.y, ev->multi.device);
processed = TRUE;
window = pressed_window;
if (get_window_rect(window, &rect)) {
/* Now convert the global coordinate to appropriate local coordinate */
+#ifdef WAYLAND
+ SclPoint coords = get_rotated_local_coords(ev->x, ev->y, context->get_rotation(), &rect);
+#else
SclPoint coords = get_rotated_local_coords(ev->root.x, ev->root.y, context->get_rotation(), &rect);
+#endif
controller->mouse_move(window, coords.x, coords.y, ev->multi.device);
processed = TRUE;
}
Eina_Bool
client_message_cb(void *data, int type, void *event)
{
+#ifndef WAYLAND
Ecore_X_Event_Client_Message *ev = (Ecore_X_Event_Client_Message *)event;
if (ev->message_type == ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL) {
CSCLWindows *windows = CSCLWindows::get_instance();
}
}
}
+#endif
return ECORE_CALLBACK_PASS_ON;
}
if (pressed[loop] != TRUE) {
pressed[loop] = TRUE;
Ecore_Event_Mouse_Button evt;
+#ifdef WAYLAND
+ Ecore_Wl_Window *wl_base_window;
+ wl_base_window = elm_win_wl_window_get(static_cast<Evas_Object*>(windows->get_base_window()));
+ if (wl_base_window)
+ evt.window = (unsigned int)ecore_wl_window_id_get(wl_base_window);
+#else
evt.window = elm_win_xwindow_get(static_cast<Evas_Object*>(windows->get_base_window()));
+#endif
//window_context = windows->get_window_context(windows->get_base_window(), FALSE);
window_context = windows->get_window_context(windows->get_base_window());
if (window_context) {
if (pressed[loop] == TRUE) {
pressed[loop] = FALSE;
Ecore_Event_Mouse_Button evt;
+#ifdef WAYLAND
+ Ecore_Wl_Window *wl_base_window;
+ wl_base_window = elm_win_wl_window_get(static_cast<Evas_Object*>(windows->get_base_window()));
+ if (wl_base_window)
+ evt.window = (unsigned int)ecore_wl_window_id_get(wl_base_window);
+#else
evt.window = elm_win_xwindow_get(static_cast<Evas_Object*>(windows->get_base_window()));
+#endif
//window_context = windows->get_window_context(windows->get_base_window(), FALSE);
window_context = windows->get_window_context(windows->get_base_window());
if (window_context) {
for (sclint loop = 0; !generated && loop < MAX_DEVICES; loop++) {
if (pressed[loop] == TRUE) {
Ecore_Event_Mouse_Move evt;
+#ifdef WAYLAND
+ Ecore_Wl_Window *wl_base_window;
+ wl_base_window = elm_win_wl_window_get(static_cast<Evas_Object*>(windows->get_base_window()));
+ if(wl_base_window)
+ evt.window = (unsigned int)ecore_wl_window_id_get(wl_base_window);
+#else
evt.window = elm_win_xwindow_get(static_cast<Evas_Object*>(windows->get_base_window()));
+#endif
//window_context = windows->get_window_context(windows->get_base_window(), FALSE);
window_context = windows->get_window_context(windows->get_base_window());
if (window_context) {
#include <glib.h>
#include <Elementary.h>
-#include <Ecore_X.h>
#include <malloc.h>
+#ifndef WAYLAND
+#include <Ecore_X.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <utilX.h>
+#endif
#include <dlog.h>
#include "sclkeyfocushandler.h"
using namespace scl;
+#ifndef WAYLAND
static Ecore_X_Atom ATOM_WM_CLASS = 0;
static Ecore_X_Window app_window = 0;
+#endif
const sclint rotation_values_EFL[ROTATION_MAX] = {
0, // ROTATION_0
void release_all(Evas_Object *win);
#include "sclgraphics-efl.h"
-#include <utilX.h>
#ifdef TEST_NEWBACKEND
#include <Ecore_Evas.h>
#include <Ecore.h>
CSCLWindowsImplEfl::CSCLWindowsImplEfl()
{
SCL_DEBUG();
+#ifndef WAYLAND
/* Initializes all window resources */
ATOM_WM_CLASS = ecore_x_atom_get("WM_CLASS");
+#endif
}
/**
static Ecore_Event_Handler *_candidate_show_handler = NULL;
+#ifndef WAYLAND
static Eina_Bool x_event_window_show_cb (void *data, int ev_type, void *event)
{
CSCLWindows *windows = CSCLWindows::get_instance();
}
return ECORE_CALLBACK_RENEW;
}
+#endif
void CSCLWindowsImplEfl::init()
window_context->etc_info = NULL;
window_context->window = parent;
- //Adding window show event handler
- _candidate_show_handler = ecore_event_handler_add (ECORE_X_EVENT_WINDOW_SHOW, x_event_window_show_cb, NULL);
+ //Adding window show event handler
+#ifndef WAYLAND
+ _candidate_show_handler = ecore_event_handler_add (ECORE_X_EVENT_WINDOW_SHOW, x_event_window_show_cb, NULL);
+#endif
#ifndef APPLY_WINDOW_MANAGER_CHANGE
+#ifndef WAYLAND
ecore_x_icccm_name_class_set(elm_win_xwindow_get(static_cast<Evas_Object*>(parent)), "Virtual Keyboard", "ISF" );
set_window_accepts_focus(parent, FALSE);
+#endif
#else
if (parent) {
evas_object_show((Evas_Object*)parent);
int rots[4] = {0, 90, 180, 270};
elm_win_wm_rotation_available_rotations_set(static_cast<Evas_Object*>(parent), rots, 4);
+#ifndef WAYLAND
CSCLUtils *utils = CSCLUtils::get_instance();
if (utils) {
utils->log("WinEfl_createbasewin %p %p, %d %d\n",
parent, elm_win_xwindow_get(static_cast<Evas_Object*>(parent)), width, height);
}
-
+#endif
return ret;
}
new_height = height;
}
+#ifndef WAYLAND
ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(win),
rotation_values_EFL[ROTATION_0], 0, 0, new_width, new_height);
ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(win),
utils->log("WinEfl_createwin %p %p, %d %d\n",
win, elm_win_xwindow_get(static_cast<Evas_Object*>(win)), width, height);
}
-
+#endif
return win;
}
SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
evas_object_resize(win, scrx, height + window_context->height);
#else
- //evas_object_resize(win, width, height);
+#ifdef WAYLAND
+ evas_object_resize(win, width, height);
+#endif
#endif
elm_win_profile_set(win, "mobile");
+#ifndef WAYLAND
ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(win),
rotation_values_EFL[ROTATION_0], 0, 0, width, height);
ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(win),
utils->log("WinEfl_createmagwin %p %p, %d %d\n",
win, elm_win_xwindow_get(static_cast<Evas_Object*>(win)), width, height);
}
-
+#endif
return win;
}
int rots[4] = {0,90,180,270};
elm_win_wm_rotation_available_rotations_set(win, rots, 4);
+#ifndef WAYLAND
#ifndef APPLY_WINDOW_MANAGER_CHANGE
ecore_x_icccm_name_class_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)), "ISF Popup", "ISF");
}
}
#endif
+#endif
elm_win_profile_set(win, "mobile");
hide_window(win);
+#ifndef WAYLAND
if (utils) {
utils->log("WinEfl_createdimwin %p %p, %d %d\n",
win, elm_win_xwindow_get(static_cast<Evas_Object*>(win)), width, height);
}
-
+#endif
return win;
}
{
SCL_DEBUG();
+#ifndef WAYLAND
if (parent && window) {
ecore_x_icccm_transient_for_set(elm_win_xwindow_get(static_cast<Evas_Object*>(window)),
elm_win_xwindow_get(static_cast<Evas_Object*>(parent)));
}
+#endif
}
Eina_Bool destroy_later(void *data)
evas_object_del(win);
}
}
+#ifndef WAYLAND
utils->log("WinEfl_destroywin %p %p (basewin %p mag %p)\n", window,
(window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
windows->get_base_window(), windows->get_magnifier_window());
+#endif
}
}
}
}
}
+#ifndef WAYLAND
#ifndef APPLY_WINDOW_MANAGER_CHANGE
if (windows->get_base_window() == window) {
int ret = 0;
window,
(window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
windows->get_base_window(), windows->get_magnifier_window());
+#endif
}
}
elm_cache_all_flush();
malloc_trim(0);
}
+#ifndef WAYLAND
utils->log("WinEfl_hidewin %p %p (basewin %p mag %p)\n",
window,
(window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
windows->get_base_window(), windows->get_magnifier_window());
+#endif
}
}
//Evas *evas = evas_object_evas_get(window_object);
//evas_render_idle_flush(evas);
+#ifndef WAYLAND
utils->log("WinEfl_movewin %p %p %d %d %d %d (basewin %p mag %p)\n",
window,
(window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
x, y, rotatex, rotatey,
windows->get_base_window(), windows->get_magnifier_window());
+#endif
}
}
#ifndef FULL_SCREEN_TEST
if (windows && utils && window) {
SclWindowContext *window_context = windows->get_window_context(window);
+#ifndef WAYLAND
utils->log("WinEfl_resizewin %p %p %d %d (basewin %p mag %p)\n",
window,
(window_context && !(window_context->is_virtual)) ? elm_win_xwindow_get(static_cast<Evas_Object*>(window)) : 0x01,
windows->get_base_window(), windows->get_magnifier_window());
+#endif
}
#endif
//Evas_Object *window_object = (Evas_Object*)window;
CSCLContext *context = CSCLContext::get_instance();
if (utils && context && rect && window) {
- Window junkwin;
- Ecore_X_Window_Attributes attrs;
int x, y, width, height;
sclint scr_w, scr_h;
+#ifdef WAYLAND
+ evas_object_geometry_get(static_cast<Evas_Object*>(window), &x, &y, &width, &height);
+#else
+ Window junkwin;
+ Ecore_X_Window_Attributes attrs;
//CSCLWindows *windows = CSCLWindows::get_instance();
ecore_x_window_geometry_get(elm_win_xwindow_get(static_cast<Evas_Object*>(window)), &x, &y, &width, &height);
ecore_x_window_attributes_get(elm_win_xwindow_get(static_cast<Evas_Object*>(window)), &attrs);
utils->log("WinEfl_getwinrect %p %p, %d %d %d %d\n",
window, elm_win_xwindow_get(static_cast<Evas_Object*>(window)),
x, y, width, height);
+#endif
/* get window size */
utils->get_screen_resolution(&scr_w, &scr_h);
return TRUE;
}
+#ifndef WAYLAND
#include <X11/Xutil.h>
+#endif
/**
* Sets rotation
*/
{
SCL_DEBUG();
+#ifndef WAYLAND
CSCLWindows *windows = CSCLWindows::get_instance();
SclWindowContext *window_context = NULL;
windows->resize_window(window_context->window, window_context->width, winctx->height);
}*/
}
+#endif
}
#ifndef APPLY_WINDOW_MANAGER_CHANGE
void CSCLWindowsImplEfl::set_window_accepts_focus(const sclwindow window, sclboolean acceptable)
{
- Eina_Bool accepts_focus;
- Ecore_X_Window_State_Hint initial_state;
- Ecore_X_Pixmap icon_pixmap;
- Ecore_X_Pixmap icon_mask;
- Ecore_X_Window icon_window;
- Ecore_X_Window window_group;
- Eina_Bool is_urgent;
-
- if (window) {
- ecore_x_icccm_hints_get(elm_win_xwindow_get(static_cast<Evas_Object*>(window)),
- &accepts_focus, &initial_state, &icon_pixmap, &icon_mask, &icon_window, &window_group, &is_urgent);
- ecore_x_icccm_hints_set(elm_win_xwindow_get(static_cast<Evas_Object*>(window)),
- acceptable, initial_state, icon_pixmap, icon_mask, icon_window, window_group, is_urgent);
- }
+ elm_win_prop_focus_skip_set(static_cast<Evas_Object*>(window), !acceptable);
}
#endif
#include <Elementary.h>
#include <Evas.h>
#include <dlog.h>
+#ifndef WAYLAND
#include <Ecore_X.h>
#include <utilX.h>
+#endif
#include "sclres_type.h"
#include "scldebug.h"
#include "sclcontext.h"
bool
CSCLKeyFocusHandler::grab_keyboard(const sclwindow parent)
{
+#ifndef WAYLAND
Evas_Object *window = (Evas_Object *)parent;
Ecore_X_Window x_window = elm_win_xwindow_get(window);
} else {
LOGD("Failed to Grab Return key\n");
}
+#endif
m_keyboard_grabbed = TRUE;
return TRUE;
}
void
CSCLKeyFocusHandler::ungrab_keyboard(const sclwindow parent)
{
+#ifndef WAYLAND
Evas_Object *window = (Evas_Object *)parent;
Ecore_X_Window x_window = elm_win_xwindow_get(window);
Display *x_display = (Display *)ecore_x_display_get();
} else {
LOGD("Failed to UnGrab Return key\n");
}
+#endif
m_keyboard_grabbed = FALSE;
}
/**
* callback for window show event (sniffer window)
*/
+#ifndef WAYLAND
static Eina_Bool x_event_sniffer_window_show_cb (void *data, int ev_type, void *event)
{
-
Evas_Object *evas_window = (Evas_Object *)data;
Ecore_X_Window x_window = elm_win_xwindow_get(evas_window);
Ecore_X_Event_Window_Show *e = (Ecore_X_Event_Window_Show*)event;
LOGD("Wrong window .. renewing callback\n");
return ECORE_CALLBACK_RENEW;
}
+#endif
/**
* sniffer window creation function, the keyboard would be grabbed by this window in case of Tizen Emulator
evas_object_show(win);
evas_object_resize(win, 100, 100);
m_sniffer = win;
+#ifndef WAYLAND
_sniffer_win_show_handler = ecore_event_handler_add (ECORE_X_EVENT_WINDOW_SHOW, x_event_sniffer_window_show_cb, m_sniffer);
+#endif
}
void
CSCLKeyFocusHandler::set_window_accepts_focus(const sclwindow window, sclboolean acceptable)
{
- Eina_Bool accepts_focus;
- Ecore_X_Window_State_Hint initial_state;
- Ecore_X_Pixmap icon_pixmap;
- Ecore_X_Pixmap icon_mask;
- Ecore_X_Window icon_window;
- Ecore_X_Window window_group;
- Eina_Bool is_urgent;
-
- if (window) {
- ecore_x_icccm_hints_get(elm_win_xwindow_get(static_cast<Evas_Object*>(window)),
- &accepts_focus, &initial_state, &icon_pixmap, &icon_mask, &icon_window, &window_group, &is_urgent);
- ecore_x_icccm_hints_set(elm_win_xwindow_get(static_cast<Evas_Object*>(window)),
- acceptable, initial_state, icon_pixmap, icon_mask, icon_window, window_group, is_urgent);
- }
+ elm_win_prop_focus_skip_set(static_cast<Evas_Object*>(window), !acceptable);
}
sclwindow window = m_gwes->m_windows->get_base_window();
cache->recompute_layout(window);
+#ifndef WAYLAND
/* Creates the magnifier window */
if (default_configure && magnifier_configure) {
if (default_configure->use_magnifier_window) {
/* FIXME */
//if (scl_check_arrindex(defaultLayoutIdx, MAX_LAYOUT)) {
m_gwes->m_windows->create_dim_window(window, NULL, sclres_layout[layout].width, sclres_layout[layout].height);
+#endif
/* m_gwes->m_events->set_touch_event_offset(scl_default_configure.touch_offset);*/
/*Moved to Show Layout*/
cache->init();
builder->init(parent);
+ m_initialized = TRUE;
+
PSclDefaultConfigure default_configure = sclres_manager->get_default_configure();
if (default_configure) {
set_cur_sublayout(default_configure->default_sub_layout);
}
-
- m_initialized = TRUE;
}
SCL_DEBUG_ELAPASED_TIME_END();
#include <stdarg.h>
#include <Ecore.h>
+#ifdef WAYLAND
+#include <Ecore_Wayland.h>
+#else
#include <Ecore_X.h>
+#endif
#include <Ecore_Evas.h>
#include <feedback.h>
#include <Elementary.h>
using namespace scl;
static tts_h tts = NULL;
+#ifndef WAYLAND
static Eina_Bool _get_default_zone_geometry_info (Ecore_X_Window root, scluint *x, scluint *y, scluint *w, scluint *h)
{
Ecore_X_Atom zone_geometry_atom;
return ret;
}
-
+#endif
void accessibility_changed_cb(keynode_t *key, void* data)
{
int r;
static Evas_Coord scr_w = 0, scr_h = 0;
if (scr_w == 0 || scr_h == 0) {
+#ifdef WAYLAND
+ ecore_wl_sync();
+ ecore_wl_screen_size_get(&scr_w, &scr_h);
+ if (scr_w >= 720)
+ scr_w = 720;
+ else
+ scr_w = 600;
+#else
scluint w, h;
w = h = 0;
if (_get_default_zone_geometry_info(ecore_x_window_root_first_get(), NULL, NULL, &w, &h)) {
} else {
ecore_x_window_size_get(ecore_x_window_root_first_get(), &scr_w, &scr_h);
}
+#endif
}
if (context && x && y) {
if (context->get_display_mode() == DISPLAYMODE_LANDSCAPE) {