@bugfix: Fix building for WAYLAND_ONLY by using the proper define

sed -i 's/WAYLAND_ONLY/HAVE_WAYLAND_ONLY/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-03-11 11:24:41 +00:00
parent 13509d6dcc
commit 915f8f0613
49 changed files with 378 additions and 131 deletions

View File

@ -212,6 +212,7 @@ enlightenment_src = \
src/bin/e_about.c \ src/bin/e_about.c \
src/bin/e_acpi.c \ src/bin/e_acpi.c \
src/bin/e_actions.c \ src/bin/e_actions.c \
src/bin/e_alert.c \
src/bin/e_atoms.c \ src/bin/e_atoms.c \
src/bin/e_auth.c \ src/bin/e_auth.c \
src/bin/e_backlight.c \ src/bin/e_backlight.c \
@ -239,9 +240,9 @@ src/bin/e_deskenv.c \
src/bin/e_desklock.c \ src/bin/e_desklock.c \
src/bin/e_deskmirror.c \ src/bin/e_deskmirror.c \
src/bin/e_dialog.c \ src/bin/e_dialog.c \
src/bin/e_dnd.c \
src/bin/e_dpms.c \ src/bin/e_dpms.c \
src/bin/e_desktop_editor.c \ src/bin/e_desktop_editor.c \
src/bin/e_dnd.c \
src/bin/e_entry.c \ src/bin/e_entry.c \
src/bin/e_entry_dialog.c \ src/bin/e_entry_dialog.c \
src/bin/e_env.c \ src/bin/e_env.c \
@ -360,6 +361,7 @@ src/bin/e_widget_textblock.c \
src/bin/e_widget_toolbar.c \ src/bin/e_widget_toolbar.c \
src/bin/e_widget_toolbook.c \ src/bin/e_widget_toolbook.c \
src/bin/e_win.c \ src/bin/e_win.c \
src/bin/e_xkb.c \
src/bin/e_xinerama.c \ src/bin/e_xinerama.c \
src/bin/e_zoomap.c \ src/bin/e_zoomap.c \
src/bin/e_zone.c \ src/bin/e_zone.c \
@ -367,10 +369,8 @@ $(ENLIGHTENMENTHEADERS)
if ! HAVE_WAYLAND_ONLY if ! HAVE_WAYLAND_ONLY
enlightenment_src += \ enlightenment_src += \
src/bin/e_alert.c \
src/bin/e_comp_x.c \ src/bin/e_comp_x.c \
src/bin/e_randr.c \ src/bin/e_randr.c \
src/bin/e_xkb.c \
src/bin/e_xsettings.c src/bin/e_xsettings.c
endif endif

View File

@ -122,6 +122,10 @@ void *alloca (size_t);
# include <E_Hal.h> # include <E_Hal.h>
# endif # endif
# ifdef HAVE_WAYLAND
# include <Ecore_Wayland.h>
# endif
# ifdef EAPI # ifdef EAPI
# undef EAPI # undef EAPI
# endif # endif

View File

@ -2837,17 +2837,23 @@ ACT_FN_GO(kbd_layout, )
errno = 0; errno = 0;
x = strtoul(params, NULL, 10); x = strtoul(params, NULL, 10);
if (errno || (x > eina_list_count(e_config->xkb.used_layouts) - 1)) return; if (errno || (x > eina_list_count(e_config->xkb.used_layouts) - 1)) return;
#ifndef HAVE_WAYLAND_ONLY
e_xkb_layout_set(eina_list_nth(e_config->xkb.used_layouts, x)); e_xkb_layout_set(eina_list_nth(e_config->xkb.used_layouts, x));
#endif
} }
ACT_FN_GO(kbd_layout_next, __UNUSED__) ACT_FN_GO(kbd_layout_next, __UNUSED__)
{ {
#ifndef HAVE_WAYLAND_ONLY
e_xkb_layout_next(); e_xkb_layout_next();
#endif
} }
ACT_FN_GO(kbd_layout_prev, __UNUSED__) ACT_FN_GO(kbd_layout_prev, __UNUSED__)
{ {
#ifndef HAVE_WAYLAND_ONLY
e_xkb_layout_prev(); e_xkb_layout_prev();
#endif
} }
ACT_FN_GO(module_enable, ) ACT_FN_GO(module_enable, )

View File

@ -19,6 +19,7 @@ e_alert_shutdown(void)
EAPI void EAPI void
e_alert_composite_win(Ecore_X_Window root, Ecore_X_Window comp) e_alert_composite_win(Ecore_X_Window root, Ecore_X_Window comp)
{ {
#ifndef HAVE_WAYLAND_ONLY
Ecore_X_Atom composite_win; Ecore_X_Atom composite_win;
composite_win = ecore_x_atom_get("_E_COMP_WINDOW"); composite_win = ecore_x_atom_get("_E_COMP_WINDOW");
@ -27,6 +28,7 @@ e_alert_composite_win(Ecore_X_Window root, Ecore_X_Window comp)
ecore_x_window_prop_property_del(root, composite_win); ecore_x_window_prop_property_del(root, composite_win);
else else
ecore_x_window_prop_card32_set(root, composite_win, &comp, 1); ecore_x_window_prop_card32_set(root, composite_win, &comp, 1);
#endif
} }
EAPI void EAPI void

View File

@ -1,6 +1,7 @@
#include "e.h" #include "e.h"
/* Atoms */ /* Atoms */
#ifndef HAVE_WAYLAND_ONLY
EAPI Ecore_X_Atom E_ATOM_MANAGED = 0; EAPI Ecore_X_Atom E_ATOM_MANAGED = 0;
EAPI Ecore_X_Atom E_ATOM_ZONE = 0; EAPI Ecore_X_Atom E_ATOM_ZONE = 0;
EAPI Ecore_X_Atom E_ATOM_DESK = 0; EAPI Ecore_X_Atom E_ATOM_DESK = 0;
@ -12,11 +13,13 @@ EAPI Ecore_X_Atom E_ATOM_WINDOW_STATE = 0;
EAPI Ecore_X_Atom E_ATOM_WINDOW_STATE_CENTERED = 0; EAPI Ecore_X_Atom E_ATOM_WINDOW_STATE_CENTERED = 0;
EAPI Ecore_X_Atom E_ATOM_DESKTOP_FILE = 0; EAPI Ecore_X_Atom E_ATOM_DESKTOP_FILE = 0;
EAPI Ecore_X_Atom E_ATOM_ZONE_GEOMETRY = 0; EAPI Ecore_X_Atom E_ATOM_ZONE_GEOMETRY = 0;
#endif
/* externally accessible functions */ /* externally accessible functions */
EINTERN int EINTERN int
e_atoms_init(void) e_atoms_init(void)
{ {
#ifndef HAVE_WAYLAND_ONLY
const char *atom_names[] = { const char *atom_names[] = {
"__E_WINDOW_MANAGED", "__E_WINDOW_MANAGED",
"__E_WINDOW_ZONE", "__E_WINDOW_ZONE",
@ -44,6 +47,7 @@ e_atoms_init(void)
E_ATOM_WINDOW_STATE_CENTERED = atoms[8]; E_ATOM_WINDOW_STATE_CENTERED = atoms[8];
E_ATOM_DESKTOP_FILE = atoms[9]; E_ATOM_DESKTOP_FILE = atoms[9];
E_ATOM_ZONE_GEOMETRY = atoms[10]; E_ATOM_ZONE_GEOMETRY = atoms[10];
#endif
return 1; return 1;
} }

View File

@ -21,7 +21,7 @@ static void _e_backlight_update(E_Zone *zone);
static void _e_backlight_set(E_Zone *zone, double val); static void _e_backlight_set(E_Zone *zone, double val);
static Eina_Bool _bl_anim(void *data, double pos); static Eina_Bool _bl_anim(void *data, double pos);
static Eina_Bool bl_avail = EINA_TRUE; static Eina_Bool bl_avail = EINA_TRUE;
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
static Eina_Bool xbl_avail = EINA_FALSE; static Eina_Bool xbl_avail = EINA_FALSE;
#endif #endif
#ifdef HAVE_EEZE #ifdef HAVE_EEZE
@ -47,7 +47,7 @@ e_backlight_init(void)
eeze_init(); eeze_init();
#endif #endif
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (e_comp_get(NULL)->man->root) if (e_comp_get(NULL)->man->root)
xbl_avail = ecore_x_randr_output_backlight_available(); xbl_avail = ecore_x_randr_output_backlight_available();
#endif #endif
@ -197,7 +197,7 @@ static void
_e_backlight_update(E_Zone *zone) _e_backlight_update(E_Zone *zone)
{ {
double x_bl = -1.0; double x_bl = -1.0;
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
Ecore_X_Window root; Ecore_X_Window root;
Ecore_X_Randr_Output *out; Ecore_X_Randr_Output *out;
int i, num = 0; int i, num = 0;
@ -254,8 +254,11 @@ _e_backlight_update(E_Zone *zone)
static void static void
_e_backlight_set(E_Zone *zone, double val) _e_backlight_set(E_Zone *zone, double val)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
if (0) if (0)
{
return;
}
#else #else
if (sysmode == MODE_RANDR) if (sysmode == MODE_RANDR)
{ {

View File

@ -381,12 +381,14 @@ e_bindings_mouse_grab(E_Binding_Context ctxt, Ecore_X_Window win)
{ {
if (_e_bindings_context_match(binding->ctxt, ctxt)) if (_e_bindings_context_match(binding->ctxt, ctxt))
{ {
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_button_grab(win, binding->button, ecore_x_window_button_grab(win, binding->button,
ECORE_X_EVENT_MASK_MOUSE_DOWN | ECORE_X_EVENT_MASK_MOUSE_DOWN |
ECORE_X_EVENT_MASK_MOUSE_UP | ECORE_X_EVENT_MASK_MOUSE_UP |
ECORE_X_EVENT_MASK_MOUSE_MOVE, ECORE_X_EVENT_MASK_MOUSE_MOVE,
e_bindings_modifiers_to_ecore_convert(binding->mod), e_bindings_modifiers_to_ecore_convert(binding->mod),
binding->any_mod); binding->any_mod);
#endif
} }
} }
} }
@ -401,8 +403,10 @@ e_bindings_mouse_ungrab(E_Binding_Context ctxt, Ecore_X_Window win)
{ {
if (_e_bindings_context_match(binding->ctxt, ctxt)) if (_e_bindings_context_match(binding->ctxt, ctxt))
{ {
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_button_ungrab(win, binding->button, ecore_x_window_button_ungrab(win, binding->button,
e_bindings_modifiers_to_ecore_convert(binding->mod), binding->any_mod); e_bindings_modifiers_to_ecore_convert(binding->mod), binding->any_mod);
#endif
} }
} }
} }
@ -589,8 +593,12 @@ e_bindings_key_grab(E_Binding_Context ctxt, Ecore_X_Window win)
if (_e_bindings_context_match(binding->ctxt, ctxt)) if (_e_bindings_context_match(binding->ctxt, ctxt))
{ {
if (e_bindings_key_allowed(binding->key)) if (e_bindings_key_allowed(binding->key))
ecore_x_window_key_grab(win, binding->key, {
e_bindings_modifiers_to_ecore_convert(binding->mod), binding->any_mod); #ifndef HAVE_WAYLAND_ONLY
ecore_x_window_key_grab(win, binding->key,
e_bindings_modifiers_to_ecore_convert(binding->mod), binding->any_mod);
#endif
}
} }
} }
} }
@ -606,8 +614,12 @@ e_bindings_key_ungrab(E_Binding_Context ctxt, Ecore_X_Window win)
if (_e_bindings_context_match(binding->ctxt, ctxt)) if (_e_bindings_context_match(binding->ctxt, ctxt))
{ {
if (e_bindings_key_allowed(binding->key)) if (e_bindings_key_allowed(binding->key))
ecore_x_window_key_ungrab(win, binding->key, {
e_bindings_modifiers_to_ecore_convert(binding->mod), binding->any_mod); #ifndef HAVE_WAYLAND_ONLY
ecore_x_window_key_ungrab(win, binding->key,
e_bindings_modifiers_to_ecore_convert(binding->mod), binding->any_mod);
#endif
}
} }
} }
} }
@ -1176,10 +1188,12 @@ e_bindings_wheel_grab(E_Binding_Context ctxt, Ecore_X_Window win)
else if (binding->z > 0) else if (binding->z > 0)
button = 7; button = 7;
} }
#ifndef HAVE_WAYLAND_ONLY
if (button != 0) if (button != 0)
ecore_x_window_button_grab(win, button, ecore_x_window_button_grab(win, button,
ECORE_X_EVENT_MASK_MOUSE_DOWN, ECORE_X_EVENT_MASK_MOUSE_DOWN,
e_bindings_modifiers_to_ecore_convert(binding->mod), binding->any_mod); e_bindings_modifiers_to_ecore_convert(binding->mod), binding->any_mod);
#endif
} }
} }
} }
@ -1208,9 +1222,11 @@ e_bindings_wheel_ungrab(E_Binding_Context ctxt, Ecore_X_Window win)
else if (binding->z > 0) else if (binding->z > 0)
button = 7; button = 7;
} }
#ifndef HAVE_WAYLAND_ONLY
if (button != 0) if (button != 0)
ecore_x_window_button_ungrab(win, button, ecore_x_window_button_ungrab(win, button,
e_bindings_modifiers_to_ecore_convert(binding->mod), binding->any_mod); e_bindings_modifiers_to_ecore_convert(binding->mod), binding->any_mod);
#endif
} }
} }
} }

View File

@ -148,12 +148,13 @@ e_canvas_new(Ecore_Window win, int x, int y, int w, int h,
{ {
Ecore_Evas *ee = NULL; Ecore_Evas *ee = NULL;
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
ee = ecore_evas_wayland_shm_new(NULL, win, x, y, w, h, 0); ee = ecore_evas_wayland_shm_new(NULL, win, x, y, w, h, 0);
if (ee) if (ee)
{ {
ecore_evas_override_set(ee, override); ecore_evas_override_set(ee, override);
if (win_ret) *win_ret = ecore_evas_wayland_window_get(ee); if (win_ret)
*win_ret = ecore_wl_window_id_get(ecore_evas_wayland_window_get(ee));
} }
#else #else
switch (e_comp_get(NULL)->comp_type) switch (e_comp_get(NULL)->comp_type)
@ -173,7 +174,11 @@ e_canvas_new(Ecore_Window win, int x, int y, int w, int h,
if (ee) if (ee)
{ {
ecore_evas_override_set(ee, override); ecore_evas_override_set(ee, override);
if (win_ret) *win_ret = (Ecore_Window)ecore_evas_wayland_window_get(ee); if (win_ret)
{
*win_ret =
ecore_wl_window_id_get(ecore_evas_wayland_window_get(ee));
}
} }
break; break;
# endif # endif

View File

@ -2676,12 +2676,14 @@ e_client_mouse_move(E_Client *ec, Evas_Point *output)
e_object_ref(E_OBJECT(ec)); e_object_ref(E_OBJECT(ec));
e_comp_object_frame_icon_geometry_get(ec->frame, &x, &y, &w, &h); e_comp_object_frame_icon_geometry_get(ec->frame, &x, &y, &w, &h);
#ifndef HAVE_WAYLAND_ONLY
client_drag = e_drag_new(ec->zone->comp, client_drag = e_drag_new(ec->zone->comp,
output->x, output->y, output->x, output->y,
drag_types, 1, ec, -1, drag_types, 1, ec, -1,
NULL, NULL,
_e_client_cb_drag_finished); _e_client_cb_drag_finished);
e_drag_resize(client_drag, w, h); e_drag_resize(client_drag, w, h);
#endif
o = e_client_icon_add(ec, client_drag->evas); o = e_client_icon_add(ec, client_drag->evas);
if (!o) if (!o)
{ {
@ -2689,10 +2691,12 @@ e_client_mouse_move(E_Client *ec, Evas_Point *output)
o = evas_object_rectangle_add(client_drag->evas); o = evas_object_rectangle_add(client_drag->evas);
evas_object_color_set(o, 255, 255, 255, 255); evas_object_color_set(o, 255, 255, 255, 255);
} }
#ifndef HAVE_WAYLAND_ONLY
e_drag_object_set(client_drag, o); e_drag_object_set(client_drag, o);
e_drag_start(client_drag, e_drag_start(client_drag,
output->x + (ec->drag.x - x), output->x + (ec->drag.x - x),
output->y + (ec->drag.y - y)); output->y + (ec->drag.y - y));
#endif
} }
ec->drag.start = 0; ec->drag.start = 0;
} }
@ -3574,8 +3578,13 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy)
else if (e_config->mode.presentation) else if (e_config->mode.presentation)
evas_object_layer_set(ec->frame, E_LAYER_CLIENT_TOP); evas_object_layer_set(ec->frame, E_LAYER_CLIENT_TOP);
#ifndef HAVE_WAYLAND_ONLY
if ((eina_list_count(ec->comp->zones) > 1) || if ((eina_list_count(ec->comp->zones) > 1) ||
(policy == E_FULLSCREEN_RESIZE) || (!ecore_x_randr_query())) (policy == E_FULLSCREEN_RESIZE) || (!ecore_x_randr_query()))
#else
if ((eina_list_count(ec->comp->zones) > 1) ||
(policy == E_FULLSCREEN_RESIZE))
#endif
{ {
evas_object_geometry_set(ec->frame, ec->zone->x, ec->zone->y, ec->zone->w, ec->zone->h); evas_object_geometry_set(ec->frame, ec->zone->x, ec->zone->y, ec->zone->w, ec->zone->h);
} }

View File

@ -290,7 +290,7 @@ struct E_Client
unsigned char changed : 1; unsigned char changed : 1;
unsigned char user_selected : 1; unsigned char user_selected : 1;
Eina_Stringshare *name; Eina_Stringshare *name;
} border; } border;
struct struct
{ {
@ -389,9 +389,9 @@ struct E_Client
unsigned int desktop; unsigned int desktop;
Eina_Stringshare *name; Eina_Stringshare *name;
Eina_Stringshare *icon_name; Eina_Stringshare *icon_name;
#ifdef E_COMP_X_H
Ecore_X_Icon *icons; Ecore_X_Icon *icons;
#endif
int num_icons; int num_icons;
unsigned int user_time; unsigned int user_time;
unsigned char opacity; unsigned char opacity;

View File

@ -726,7 +726,11 @@ _e_comp_shapes_update_job(E_Comp *c)
} }
#endif #endif
} }
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_shape_input_rectangles_set(c->win, (Ecore_X_Rectangle*)exr, i); ecore_x_window_shape_input_rectangles_set(c->win, (Ecore_X_Rectangle*)exr, i);
#endif
#ifdef SHAPE_DEBUG #ifdef SHAPE_DEBUG
E_FREE_LIST(rl, free); E_FREE_LIST(rl, free);
printf("\n"); printf("\n");
@ -1127,7 +1131,7 @@ e_comp_init(void)
} }
} }
#endif #endif
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (!e_comp_x_init()) return EINA_FALSE; if (!e_comp_x_init()) return EINA_FALSE;
#endif #endif
#ifdef HAVE_WAYLAND_CLIENTS #ifdef HAVE_WAYLAND_CLIENTS

View File

@ -224,7 +224,10 @@ _e_comp_object_cb_signal_bind(void *data, Evas_Object *obj EINA_UNUSED, const ch
{ {
E_Comp_Object *cw = data; E_Comp_Object *cw = data;
if (e_dnd_active() || (!cw->ec)) return; if (!cw->ec) return;
#ifndef HAVE_WAYLAND_ONLY
if (e_dnd_active()) return;
#endif
e_bindings_signal_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(cw->ec), e_bindings_signal_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(cw->ec),
emission, source); emission, source);
} }

View File

@ -314,7 +314,7 @@ e_comp_wl_init(void)
goto err; goto err;
} }
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
/* setup keymap_change event handler */ /* setup keymap_change event handler */
_e_wl_comp->kbd_handler = _e_wl_comp->kbd_handler =
ecore_event_handler_add(ECORE_X_EVENT_XKB_STATE_NOTIFY, ecore_event_handler_add(ECORE_X_EVENT_XKB_STATE_NOTIFY,
@ -344,7 +344,7 @@ e_comp_wl_init(void)
} }
wl_event_loop_dispatch(_e_wl_comp->wl.loop, 0); wl_event_loop_dispatch(_e_wl_comp->wl.loop, 0);
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
/* add an idler for deferred shell module loading */ /* add an idler for deferred shell module loading */
_module_idler = ecore_idler_add(_e_comp_wl_cb_module_idle, NULL); _module_idler = ecore_idler_add(_e_comp_wl_cb_module_idle, NULL);
#endif #endif
@ -355,7 +355,7 @@ err:
/* remove kbd handler */ /* remove kbd handler */
if (_e_wl_comp->kbd_handler) if (_e_wl_comp->kbd_handler)
ecore_event_handler_del(_e_wl_comp->kbd_handler); ecore_event_handler_del(_e_wl_comp->kbd_handler);
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
/* remove the module idler */ /* remove the module idler */
if (_module_idler) ecore_idler_del(_module_idler); if (_module_idler) ecore_idler_del(_module_idler);
#endif #endif
@ -423,13 +423,13 @@ e_comp_wl_shutdown(void)
e_module_disable(mod); e_module_disable(mod);
} }
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
EAPI int EAPI int
e_comp_wl_input_read(int fd EINA_UNUSED, unsigned int mask EINA_UNUSED, void *data) e_comp_wl_input_read(int fd EINA_UNUSED, unsigned int mask EINA_UNUSED, void *data)
{ {
E_Wayland_Compositor *wl_comp = data; E_Wayland_Compositor *wl_comp = data;
wl_event_loop_dispatch(wl_comp->wl.input_loop, 0); wl_event_loop_dispatch(wl_comp->wl.loop, 0);
return 1; return 1;
} }
#endif #endif
@ -1975,7 +1975,7 @@ _e_comp_wl_input_keymap_get(void)
names.layout = strdup(kbd_layout->name); names.layout = strdup(kbd_layout->name);
} }
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
/* if we are running under X11, try to get the xkb rule names atom */ /* if we are running under X11, try to get the xkb rule names atom */
if (getenv("DISPLAY")) if (getenv("DISPLAY"))
{ {

View File

@ -6,7 +6,12 @@
# define WL_HIDE_DEPRECATED # define WL_HIDE_DEPRECATED
# include <pixman.h> # include <pixman.h>
/* NB: Turn off shadow warnings for Wayland includes */
# pragma GCC diagnostic ignored "-Wshadow"
# include <wayland-server.h> # include <wayland-server.h>
# pragma GCC diagnostic pop
# include <xkbcommon/xkbcommon.h> # include <xkbcommon/xkbcommon.h>
/* headers for terminal support */ /* headers for terminal support */
@ -473,7 +478,7 @@ struct _E_Wayland_Compositor
E_Wayland_Shell_Interface shell_interface; E_Wayland_Shell_Interface shell_interface;
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
Eina_Bool focus : 1; Eina_Bool focus : 1;
unsigned int output_pool; unsigned int output_pool;
@ -592,7 +597,7 @@ extern EAPI E_Wayland_Compositor *_e_wl_comp;
EAPI Eina_Bool e_comp_wl_init(void); EAPI Eina_Bool e_comp_wl_init(void);
EINTERN void e_comp_wl_shutdown(void); EINTERN void e_comp_wl_shutdown(void);
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
EAPI int e_comp_wl_input_read(int fd EINA_UNUSED, unsigned int mask EINA_UNUSED, void *data); EAPI int e_comp_wl_input_read(int fd EINA_UNUSED, unsigned int mask EINA_UNUSED, void *data);
#endif #endif

View File

@ -892,9 +892,11 @@ _e_desk_hide_begin(E_Desk *desk, int dx, int dy)
static void static void
_e_desk_window_profile_change_protocol_set(void) _e_desk_window_profile_change_protocol_set(void)
{ {
#ifndef HAVE_WAYLAND_ONLY
Eina_List *l = NULL; Eina_List *l = NULL;
E_Manager *man; E_Manager *man;
EINA_LIST_FOREACH(e_manager_list(), l, man) EINA_LIST_FOREACH(e_manager_list(), l, man)
ecore_x_e_window_profile_supported_set(man->root, e_config->use_desktop_window_profile); ecore_x_e_window_profile_supported_set(man->root, e_config->use_desktop_window_profile);
#endif
} }

View File

@ -420,12 +420,14 @@ _e_desklock_cb_idle_poller(void *data __UNUSED__)
{ {
if ((e_config->desklock_autolock_idle) && (!e_config->mode.presentation)) if ((e_config->desklock_autolock_idle) && (!e_config->mode.presentation))
{ {
double idle, max; double idle = 0.0, max;
/* If a desklock is already up, bail */ /* If a desklock is already up, bail */
if ((_e_custom_desklock_exe) || (_e_desklock_state)) return ECORE_CALLBACK_RENEW; if ((_e_custom_desklock_exe) || (_e_desklock_state)) return ECORE_CALLBACK_RENEW;
#ifndef HAVE_WAYLAND_ONLY
idle = ecore_x_screensaver_idle_time_get(); idle = ecore_x_screensaver_idle_time_get();
#endif
max = e_config->desklock_autolock_idle_timeout; max = e_config->desklock_autolock_idle_timeout;
if (_e_desklock_ask_presentation_count > 0) if (_e_desklock_ask_presentation_count > 0)
max *= (1 + _e_desklock_ask_presentation_count); max *= (1 + _e_desklock_ask_presentation_count);
@ -491,7 +493,9 @@ _e_desklock_ask_presentation_no_increase(void *data __UNUSED__, E_Dialog *dia)
blanking = e_config->screensaver_blanking; blanking = e_config->screensaver_blanking;
expose = e_config->screensaver_expose; expose = e_config->screensaver_expose;
#ifndef HAVE_WAYLAND_ONLY
ecore_x_screensaver_set(timeout, interval, blanking, expose); ecore_x_screensaver_set(timeout, interval, blanking, expose);
#endif
e_object_del(E_OBJECT(dia)); e_object_del(E_OBJECT(dia));
} }

View File

@ -222,10 +222,12 @@ EAPI void
e_dialog_parent_set(E_Dialog *dia, E_Win *win) e_dialog_parent_set(E_Dialog *dia, E_Win *win)
{ {
if (!dia) return; if (!dia) return;
#ifndef HAVE_WAYLAND_ONLY
if (win) if (win)
ecore_x_icccm_transient_for_set(dia->win->evas_win, win->evas_win); ecore_x_icccm_transient_for_set(dia->win->evas_win, win->evas_win);
else else
ecore_x_icccm_transient_for_unset(dia->win->evas_win); ecore_x_icccm_transient_for_unset(dia->win->evas_win);
#endif
ecore_evas_modal_set(dia->win->ecore_evas, !!win); ecore_evas_modal_set(dia->win->ecore_evas, !!win);
} }

View File

@ -17,6 +17,7 @@ static Eina_Bool _e_dnd_cb_key_down(void *data, int type, void *event);
static Eina_Bool _e_dnd_cb_key_up(void *data, int type, void *event); static Eina_Bool _e_dnd_cb_key_up(void *data, int type, void *event);
static Eina_Bool _e_dnd_cb_mouse_up(void *data, int type, void *event); static Eina_Bool _e_dnd_cb_mouse_up(void *data, int type, void *event);
static Eina_Bool _e_dnd_cb_mouse_move(void *data, int type, void *event); static Eina_Bool _e_dnd_cb_mouse_move(void *data, int type, void *event);
#ifndef HAVE_WAYLAND_ONLY
static Eina_Bool _e_dnd_cb_event_dnd_enter(void *data, int type, void *event); static Eina_Bool _e_dnd_cb_event_dnd_enter(void *data, int type, void *event);
static Eina_Bool _e_dnd_cb_event_dnd_leave(void *data, int type, void *event); static Eina_Bool _e_dnd_cb_event_dnd_leave(void *data, int type, void *event);
static Eina_Bool _e_dnd_cb_event_dnd_position(void *data, int type, void *event); static Eina_Bool _e_dnd_cb_event_dnd_position(void *data, int type, void *event);
@ -25,6 +26,7 @@ static Eina_Bool _e_dnd_cb_event_dnd_finished(void *data, int type, void *e
static Eina_Bool _e_dnd_cb_event_dnd_drop(void *data, int type, void *event); static Eina_Bool _e_dnd_cb_event_dnd_drop(void *data, int type, void *event);
static Eina_Bool _e_dnd_cb_event_dnd_selection(void *data, int type, void *event); static Eina_Bool _e_dnd_cb_event_dnd_selection(void *data, int type, void *event);
static Eina_Bool _e_dnd_cb_event_hide(void *data, int type, Ecore_X_Event_Window_Hide *ev); static Eina_Bool _e_dnd_cb_event_hide(void *data, int type, Ecore_X_Event_Window_Hide *ev);
#endif
/* local subsystem globals */ /* local subsystem globals */
@ -108,13 +110,18 @@ e_dnd_init(void)
_type_xds = eina_stringshare_add("XdndDirectSave0"); _type_xds = eina_stringshare_add("XdndDirectSave0");
_type_text_x_moz_url = eina_stringshare_add("text/x-moz-url"); _type_text_x_moz_url = eina_stringshare_add("text/x-moz-url");
_type_enlightenment_x_file = eina_stringshare_add("enlightenment/x-file"); _type_enlightenment_x_file = eina_stringshare_add("enlightenment/x-file");
#ifndef HAVE_WAYLAND_ONLY
_text_atom = ecore_x_atom_get("text/plain"); _text_atom = ecore_x_atom_get("text/plain");
#endif
_drop_win_hash = eina_hash_int32_new(NULL); _drop_win_hash = eina_hash_int32_new(NULL);
_drop_handlers_responsives = eina_hash_int32_new(NULL); _drop_handlers_responsives = eina_hash_int32_new(NULL);
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_MOUSE_BUTTON_UP, _e_dnd_cb_mouse_up, NULL); E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_MOUSE_BUTTON_UP, _e_dnd_cb_mouse_up, NULL);
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_MOUSE_MOVE, _e_dnd_cb_mouse_move, NULL); E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_MOUSE_MOVE, _e_dnd_cb_mouse_move, NULL);
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_KEY_DOWN, _e_dnd_cb_key_down, NULL);
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_KEY_UP, _e_dnd_cb_key_up, NULL);
#ifndef HAVE_WAYLAND_ONLY
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_ENTER, _e_dnd_cb_event_dnd_enter, NULL); E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_ENTER, _e_dnd_cb_event_dnd_enter, NULL);
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_LEAVE, _e_dnd_cb_event_dnd_leave, NULL); E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_LEAVE, _e_dnd_cb_event_dnd_leave, NULL);
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_POSITION, _e_dnd_cb_event_dnd_position, NULL); E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_POSITION, _e_dnd_cb_event_dnd_position, NULL);
@ -123,13 +130,14 @@ e_dnd_init(void)
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_DROP, _e_dnd_cb_event_dnd_drop, NULL); E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_XDND_DROP, _e_dnd_cb_event_dnd_drop, NULL);
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_SELECTION_NOTIFY, _e_dnd_cb_event_dnd_selection, NULL); E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_SELECTION_NOTIFY, _e_dnd_cb_event_dnd_selection, NULL);
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_WINDOW_HIDE, _e_dnd_cb_event_hide, NULL); E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_WINDOW_HIDE, _e_dnd_cb_event_hide, NULL);
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_KEY_DOWN, _e_dnd_cb_key_down, NULL); #endif
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_KEY_UP, _e_dnd_cb_key_up, NULL);
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp_list(), l, c)
e_drop_xdnd_register_set(c->ee_win, 1); e_drop_xdnd_register_set(c->ee_win, 1);
#ifndef HAVE_WAYLAND_ONLY
_action = ECORE_X_ATOM_XDND_ACTION_PRIVATE; _action = ECORE_X_ATOM_XDND_ACTION_PRIVATE;
#endif
return 1; return 1;
} }
@ -204,7 +212,9 @@ e_drag_new(E_Comp *comp, int x, int y,
_drag_list = eina_list_append(_drag_list, drag); _drag_list = eina_list_append(_drag_list, drag);
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_shadow_tree_flush(); ecore_x_window_shadow_tree_flush();
#endif
_drag_win_root = drag->comp->man->root; _drag_win_root = drag->comp->man->root;
@ -269,14 +279,18 @@ e_drag_start(E_Drag *drag, int x, int y)
E_Drop_Handler *h; E_Drop_Handler *h;
if (_drag_win) return 0; if (_drag_win) return 0;
#ifndef HAVE_WAYLAND_ONLY
_drag_win = ecore_x_window_input_new(drag->comp->win, _drag_win = ecore_x_window_input_new(drag->comp->win,
drag->comp->man->x, drag->comp->man->y, drag->comp->man->x, drag->comp->man->y,
drag->comp->man->w, drag->comp->man->h); drag->comp->man->w, drag->comp->man->h);
_drag_win_root = drag->comp->man->root;
ecore_x_window_show(_drag_win); ecore_x_window_show(_drag_win);
#endif
_drag_win_root = drag->comp->man->root;
if (!e_grabinput_get(_drag_win, 1, _drag_win)) if (!e_grabinput_get(_drag_win, 1, _drag_win))
{ {
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_free(_drag_win); ecore_x_window_free(_drag_win);
#endif
return 0; return 0;
} }
if (!drag->object) if (!drag->object)
@ -317,23 +331,29 @@ e_drag_start(E_Drag *drag, int x, int y)
EAPI int EAPI int
e_drag_xdnd_start(E_Drag *drag, int x, int y) e_drag_xdnd_start(E_Drag *drag, int x, int y)
{ {
#ifndef HAVE_WAYLAND_ONLY
Ecore_X_Atom actions[] = { Ecore_X_Atom actions[] = {
ECORE_X_DND_ACTION_MOVE, ECORE_X_DND_ACTION_PRIVATE, ECORE_X_DND_ACTION_MOVE, ECORE_X_DND_ACTION_PRIVATE,
ECORE_X_DND_ACTION_COPY, ECORE_X_DND_ACTION_ASK, ECORE_X_DND_ACTION_COPY, ECORE_X_DND_ACTION_ASK,
ECORE_X_DND_ACTION_LINK ECORE_X_DND_ACTION_LINK
}; };
#endif
const Eina_List *l; const Eina_List *l;
E_Drop_Handler *h; E_Drop_Handler *h;
if (_drag_win) return 0; if (_drag_win) return 0;
#ifndef HAVE_WAYLAND_ONLY
_drag_win = ecore_x_window_input_new(drag->comp->win, _drag_win = ecore_x_window_input_new(drag->comp->win,
drag->comp->man->x, drag->comp->man->y, drag->comp->man->x, drag->comp->man->y,
drag->comp->man->w, drag->comp->man->h); drag->comp->man->w, drag->comp->man->h);
ecore_x_window_show(_drag_win); ecore_x_window_show(_drag_win);
#endif
if (!e_grabinput_get(_drag_win, 1, _drag_win)) if (!e_grabinput_get(_drag_win, 1, _drag_win))
{ {
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_free(_drag_win); ecore_x_window_free(_drag_win);
#endif
return 0; return 0;
} }
if (!drag->object) if (!drag->object)
@ -366,10 +386,12 @@ e_drag_xdnd_start(E_Drag *drag, int x, int y)
h->entered = 0; h->entered = 0;
} }
#ifndef HAVE_WAYLAND_ONLY
ecore_x_dnd_aware_set(_drag_win, 1); ecore_x_dnd_aware_set(_drag_win, 1);
ecore_x_dnd_types_set(_drag_win, drag->types, drag->num_types); ecore_x_dnd_types_set(_drag_win, drag->types, drag->num_types);
ecore_x_dnd_actions_set(_drag_win, actions, 5); ecore_x_dnd_actions_set(_drag_win, actions, 5);
ecore_x_dnd_begin(_drag_win, drag->data, drag->data_size); ecore_x_dnd_begin(_drag_win, drag->data, drag->data_size);
#endif
_drag_current = drag; _drag_current = drag;
return 1; return 1;
@ -385,6 +407,7 @@ e_drop_handler_xds_set(E_Drop_Handler *handler, Eina_Bool (*cb)(void *data, cons
EAPI void EAPI void
e_drop_xds_update(Eina_Bool enable, const char *value) e_drop_xds_update(Eina_Bool enable, const char *value)
{ {
#ifndef HAVE_WAYLAND_ONLY
Ecore_X_Window xwin; Ecore_X_Window xwin;
char buf[PATH_MAX + 8]; char buf[PATH_MAX + 8];
char *file; char *file;
@ -411,6 +434,7 @@ e_drop_xds_update(Eina_Bool enable, const char *value)
} }
else else
ecore_x_window_prop_property_del(xwin, ECORE_X_ATOM_XDND_DIRECTSAVE0); ecore_x_window_prop_property_del(xwin, ECORE_X_ATOM_XDND_DIRECTSAVE0);
#endif
} }
EAPI E_Drop_Handler * EAPI E_Drop_Handler *
@ -502,13 +526,17 @@ e_drop_xdnd_register_set(Ecore_Window win, int reg)
{ {
if (!eina_hash_find(_drop_win_hash, &win)) if (!eina_hash_find(_drop_win_hash, &win))
{ {
#ifndef HAVE_WAYLAND_ONLY
ecore_x_dnd_aware_set(win, 1); ecore_x_dnd_aware_set(win, 1);
#endif
eina_hash_add(_drop_win_hash, &win, (void *)1); eina_hash_add(_drop_win_hash, &win, (void *)1);
} }
} }
else else
{ {
#ifndef HAVE_WAYLAND_ONLY
ecore_x_dnd_aware_set(win, 0); ecore_x_dnd_aware_set(win, 0);
#endif
eina_hash_del(_drop_win_hash, &win, (void *)1); eina_hash_del(_drop_win_hash, &win, (void *)1);
} }
return 1; return 1;
@ -959,10 +987,12 @@ _e_drag_end(int x, int y)
e_grabinput_release(_drag_win, _drag_win); e_grabinput_release(_drag_win, _drag_win);
while (_drag_current->type == E_DRAG_XDND) while (_drag_current->type == E_DRAG_XDND)
{ {
#ifndef HAVE_WAYLAND_ONLY
if (!(dropped = ecore_x_dnd_drop())) if (!(dropped = ecore_x_dnd_drop()))
{ {
if (win == e_comp_get(NULL)->ee_win) break; if (win == e_comp_get(NULL)->ee_win) break;
} }
#endif
if (_drag_current->cb.finished) if (_drag_current->cb.finished)
_drag_current->cb.finished(_drag_current, dropped); _drag_current->cb.finished(_drag_current, dropped);
_drag_current->cb.finished = NULL; _drag_current->cb.finished = NULL;
@ -1117,9 +1147,11 @@ _e_drag_free(E_Drag *drag)
for (i = 0; i < drag->num_types; i++) for (i = 0; i < drag->num_types; i++)
eina_stringshare_del(drag->types[i]); eina_stringshare_del(drag->types[i]);
free(drag); free(drag);
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_free(_drag_win); ecore_x_window_free(_drag_win);
_drag_win = 0;
ecore_x_window_shadow_tree_flush(); ecore_x_window_shadow_tree_flush();
#endif
_drag_win = 0;
} }
static Eina_Bool static Eina_Bool
@ -1171,13 +1203,16 @@ _e_dnd_cb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
if (ev->window != _drag_win) return ECORE_CALLBACK_PASS_ON; if (ev->window != _drag_win) return ECORE_CALLBACK_PASS_ON;
#ifndef HAVE_WAYLAND_ONLY
if (!_xdnd) if (!_xdnd)
_e_drag_update(_drag_win_root, ev->x, ev->y, _e_drag_update(_drag_win_root, ev->x, ev->y,
_action ?: ECORE_X_ATOM_XDND_ACTION_PRIVATE); _action ?: ECORE_X_ATOM_XDND_ACTION_PRIVATE);
#endif
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }
#ifndef HAVE_WAYLAND_ONLY
static Eina_Bool static Eina_Bool
_e_dnd_cb_event_dnd_enter(void *data __UNUSED__, int type __UNUSED__, void *event) _e_dnd_cb_event_dnd_enter(void *data __UNUSED__, int type __UNUSED__, void *event)
{ {
@ -1380,7 +1415,6 @@ _e_dnd_cb_event_dnd_drop(void *data __UNUSED__, int type __UNUSED__, void *event
E_FREE(_xdnd); E_FREE(_xdnd);
} }
} }
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }
@ -1442,4 +1476,5 @@ _e_dnd_cb_event_dnd_selection(void *data __UNUSED__, int type __UNUSED__, void *
E_FREE(_xdnd); E_FREE(_xdnd);
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }
#endif

View File

@ -28,7 +28,9 @@ e_dpms_update(void)
if (_e_dpms_enabled != enabled) if (_e_dpms_enabled != enabled)
{ {
_e_dpms_enabled = enabled; _e_dpms_enabled = enabled;
#ifndef HAVE_WAYLAND_ONLY
ecore_x_dpms_enabled_set(enabled); ecore_x_dpms_enabled_set(enabled);
#endif
} }
if (!enabled) return; if (!enabled) return;
@ -54,7 +56,9 @@ e_dpms_update(void)
_e_dpms_timeout_off = off; _e_dpms_timeout_off = off;
changed = EINA_TRUE; changed = EINA_TRUE;
} }
#ifndef HAVE_WAYLAND_ONLY
if (changed) ecore_x_dpms_timeouts_set(standby, suspend, off); if (changed) ecore_x_dpms_timeouts_set(standby, suspend, off);
#endif
} }
EAPI void EAPI void
@ -65,7 +69,9 @@ e_dpms_force_update(void)
enabled = ((e_config->screensaver_enable) && enabled = ((e_config->screensaver_enable) &&
(!e_config->mode.presentation)); (!e_config->mode.presentation));
#ifndef HAVE_WAYLAND_ONLY
ecore_x_dpms_enabled_set(enabled); ecore_x_dpms_enabled_set(enabled);
#endif
if (!enabled) return; if (!enabled) return;
if (e_config->screensaver_enable) if (e_config->screensaver_enable)
@ -75,8 +81,10 @@ e_dpms_force_update(void)
suspend += 6; suspend += 6;
off += 7; off += 7;
} }
#ifndef HAVE_WAYLAND_ONLY
ecore_x_dpms_timeouts_set(standby + 10, suspend + 10, off + 10); ecore_x_dpms_timeouts_set(standby + 10, suspend + 10, off + 10);
ecore_x_dpms_timeouts_set(standby, suspend, off); ecore_x_dpms_timeouts_set(standby, suspend, off);
#endif
} }
static Eina_Bool static Eina_Bool
@ -134,9 +142,11 @@ e_dpms_init(void)
_e_dpms_handler_desk_show = ecore_event_handler_add _e_dpms_handler_desk_show = ecore_event_handler_add
(E_EVENT_DESK_SHOW, _e_dpms_handler_desk_show_cb, NULL); (E_EVENT_DESK_SHOW, _e_dpms_handler_desk_show_cb, NULL);
#ifndef HAVE_WAYLAND_ONLY
_e_dpms_enabled = ecore_x_dpms_enabled_get(); _e_dpms_enabled = ecore_x_dpms_enabled_get();
ecore_x_dpms_timeouts_get ecore_x_dpms_timeouts_get
(&_e_dpms_timeout_standby, &_e_dpms_timeout_suspend, &_e_dpms_timeout_off); (&_e_dpms_timeout_standby, &_e_dpms_timeout_suspend, &_e_dpms_timeout_off);
#endif
e_dpms_force_update(); e_dpms_force_update();

View File

@ -534,6 +534,7 @@ _e_entry_mouse_down_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *o
static Eina_Bool static Eina_Bool
_e_entry_x_selection_notify_handler(void *data, int type __UNUSED__, void *event) _e_entry_x_selection_notify_handler(void *data, int type __UNUSED__, void *event)
{ {
#ifndef HAVE_WAYLAND_ONLY
Evas_Object *entry; Evas_Object *entry;
E_Entry_Smart_Data *sd; E_Entry_Smart_Data *sd;
Ecore_X_Event_Selection_Notify *ev; Ecore_X_Event_Selection_Notify *ev;
@ -563,7 +564,7 @@ _e_entry_x_selection_notify_handler(void *data, int type __UNUSED__, void *event
} }
} }
} }
#endif
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }
@ -595,9 +596,11 @@ _e_entry_x_selection_update(Evas_Object *entry)
if (sd->password_mode) if (sd->password_mode)
return; return;
#ifndef HAVE_WAYLAND_ONLY
text = edje_object_part_text_selection_get(sd->entry_object, ENTRY_PART_NAME); text = edje_object_part_text_selection_get(sd->entry_object, ENTRY_PART_NAME);
if (text) if (text)
ecore_x_selection_primary_set(xwin, text, strlen(text) + 1); ecore_x_selection_primary_set(xwin, text, strlen(text) + 1);
#endif
} }
static void static void
@ -623,6 +626,7 @@ _entry_paste_request_signal_cb(void *data,
else else
xwin = win->evas_win; xwin = win->evas_win;
#ifndef HAVE_WAYLAND_ONLY
if (emission[sizeof("ntry,paste,request,")] == '1') if (emission[sizeof("ntry,paste,request,")] == '1')
{ {
ecore_x_selection_primary_request(xwin, ecore_x_selection_primary_request(xwin,
@ -633,6 +637,7 @@ _entry_paste_request_signal_cb(void *data,
ecore_x_selection_clipboard_request(xwin, ecore_x_selection_clipboard_request(xwin,
ECORE_X_SELECTION_TARGET_UTF8_STRING); ECORE_X_SELECTION_TARGET_UTF8_STRING);
} }
#endif
} }
static void static void
@ -812,9 +817,11 @@ _e_entry_smart_add(Evas_Object *object)
_entry_recalc_size(object); _entry_recalc_size(object);
#ifndef HAVE_WAYLAND_ONLY
sd->selection_handler = sd->selection_handler =
ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY,
_e_entry_x_selection_notify_handler, object); _e_entry_x_selection_notify_handler, object);
#endif
} }
static void static void
@ -976,7 +983,9 @@ _e_entry_cb_copy(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
xwin = c->ee_win; xwin = c->ee_win;
} }
} }
#ifndef HAVE_WAYLAND_ONLY
ecore_x_selection_clipboard_set(xwin, range, strlen(range) + 1); ecore_x_selection_clipboard_set(xwin, range, strlen(range) + 1);
#endif
} }
} }
@ -1005,7 +1014,9 @@ _e_entry_cb_paste(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
xwin = c->ee_win; xwin = c->ee_win;
} }
} }
#ifndef HAVE_WAYLAND_ONLY
ecore_x_selection_clipboard_request(xwin, ECORE_X_SELECTION_TARGET_UTF8_STRING); ecore_x_selection_clipboard_request(xwin, ECORE_X_SELECTION_TARGET_UTF8_STRING);
#endif
} }
static void static void

View File

@ -6500,6 +6500,7 @@ _e_fm_drop_menu_queue(Evas_Object *e_fm, void *args, int op)
if (!vol->mounted) if (!vol->mounted)
{ {
/* this should get picked up by the post-mount callback */ /* this should get picked up by the post-mount callback */
#ifndef HAVE_WAYLAND_ONLY
switch (op) switch (op)
{ {
case 0: //copy case 0: //copy
@ -6514,6 +6515,7 @@ _e_fm_drop_menu_queue(Evas_Object *e_fm, void *args, int op)
mop->action = ECORE_X_ATOM_XDND_ACTION_LINK; mop->action = ECORE_X_ATOM_XDND_ACTION_LINK;
break; break;
} }
#endif
return EINA_TRUE; return EINA_TRUE;
} }
switch (op) switch (op)
@ -6621,6 +6623,7 @@ _e_fm2_cb_dnd_selection_notify_post_mount(E_Volume *vol)
if (mp) if (mp)
{ {
mop->args = e_util_string_append_quoted(mop->args, &mop->size, &mop->length, mp); mop->args = e_util_string_append_quoted(mop->args, &mop->size, &mop->length, mp);
#ifndef HAVE_WAYLAND_ONLY
if (mop->action == ECORE_X_ATOM_XDND_ACTION_ASK) if (mop->action == ECORE_X_ATOM_XDND_ACTION_ASK)
continue; continue;
else if (mop->action == ECORE_X_ATOM_XDND_ACTION_MOVE) else if (mop->action == ECORE_X_ATOM_XDND_ACTION_MOVE)
@ -6629,6 +6632,7 @@ _e_fm2_cb_dnd_selection_notify_post_mount(E_Volume *vol)
e_fm2_client_file_copy(ic->sd->obj, mop->args); e_fm2_client_file_copy(ic->sd->obj, mop->args);
else if (mop->action == ECORE_X_ATOM_XDND_ACTION_LINK) else if (mop->action == ECORE_X_ATOM_XDND_ACTION_LINK)
e_fm2_client_file_symlink(ic->sd->obj, mop->args); e_fm2_client_file_symlink(ic->sd->obj, mop->args);
#endif
} }
else else
e_util_dialog_show(_("Error"), _("The recent DND operation requested for '%s' has failed."), vol->label ? : vol->udi); e_util_dialog_show(_("Error"), _("The recent DND operation requested for '%s' has failed."), vol->label ? : vol->udi);
@ -6763,6 +6767,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
((f - fp - 1 > 0) && (!strncmp(sd->realpath, fp, f - fp - 1)))) && ((f - fp - 1 > 0) && (!strncmp(sd->realpath, fp, f - fp - 1)))) &&
((size_t)(f - fp - 1) == strlen(sd->realpath))) ((size_t)(f - fp - 1) == strlen(sd->realpath)))
{ {
#ifndef HAVE_WAYLAND_ONLY
if ((e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_MOVE) || (sd->config->view.link_drop)) if ((e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_MOVE) || (sd->config->view.link_drop))
{ {
lnk = EINA_TRUE; lnk = EINA_TRUE;
@ -6770,10 +6775,12 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
goto end; goto end;
memerr = EINA_TRUE; // prevent actual file move op memerr = EINA_TRUE; // prevent actual file move op
} }
#endif
} }
} }
if (!fsel) if (!fsel)
{ {
#ifndef HAVE_WAYLAND_ONLY
if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_COPY) if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_COPY)
{ {
/* most likely someone is trying to dnd some text to us */ /* most likely someone is trying to dnd some text to us */
@ -6782,6 +6789,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
isel = eina_list_append(isel, strdup(fp)); isel = eina_list_append(isel, strdup(fp));
ecore_thread_global_data_add("efm_text_uri_list", isel, (Eina_Free_Cb)e_util_string_list_free, 0); ecore_thread_global_data_add("efm_text_uri_list", isel, (Eina_Free_Cb)e_util_string_list_free, 0);
} }
#endif
/* no files, abort! */ /* no files, abort! */
return; return;
} }
@ -6932,6 +6940,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
if (sd->drop_icon->mount_timer) ecore_timer_reset(sd->drop_icon->mount_timer); if (sd->drop_icon->mount_timer) ecore_timer_reset(sd->drop_icon->mount_timer);
else sd->drop_icon->mount_timer = ecore_timer_add(15., (Ecore_Task_Cb)_e_fm2_cb_dnd_selection_notify_post_mount_timer, sd->drop_icon); else sd->drop_icon->mount_timer = ecore_timer_add(15., (Ecore_Task_Cb)_e_fm2_cb_dnd_selection_notify_post_mount_timer, sd->drop_icon);
#ifndef HAVE_WAYLAND_ONLY
if ((e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_ASK) || if ((e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_ASK) ||
((sd->config->view.link_drop) || (!sd->drop_icon))) ((sd->config->view.link_drop) || (!sd->drop_icon)))
/* this here's some buuuullshit */ /* this here's some buuuullshit */
@ -6939,6 +6948,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
else if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_MOVE) else if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_MOVE)
/* set copy if we're over a device */ /* set copy if we're over a device */
e_drop_handler_action_set(ECORE_X_ATOM_XDND_ACTION_COPY); e_drop_handler_action_set(ECORE_X_ATOM_XDND_ACTION_COPY);
#endif
mop = e_fm2_device_mount_op_add(sd->drop_icon->mount, args, size, length); mop = e_fm2_device_mount_op_add(sd->drop_icon->mount, args, size, length);
mop->ic = sd->drop_icon; mop->ic = sd->drop_icon;
mop->mnt = sd->drop_icon->mount; mop->mnt = sd->drop_icon->mount;
@ -7031,6 +7041,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
{ {
Eina_Bool do_lnk = EINA_FALSE, do_move = EINA_FALSE, do_copy = EINA_FALSE; Eina_Bool do_lnk = EINA_FALSE, do_move = EINA_FALSE, do_copy = EINA_FALSE;
#ifndef HAVE_WAYLAND_ONLY
if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_COPY) if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_COPY)
{ {
lnk = EINA_TRUE; lnk = EINA_TRUE;
@ -7061,6 +7072,7 @@ _e_fm2_cb_dnd_selection_notify(void *data, const char *type, void *event)
e_fm2_client_file_copy(sd->obj, args); e_fm2_client_file_copy(sd->obj, args);
else if (do_move) else if (do_move)
e_fm2_client_file_move(sd->obj, args); e_fm2_client_file_move(sd->obj, args);
#endif
if ((!do_lnk) && (!do_copy) && (!do_move)) if ((!do_lnk) && (!do_copy) && (!do_move))
{ {
e_fm2_drop_menu(sd->obj, args); e_fm2_drop_menu(sd->obj, args);
@ -7404,7 +7416,8 @@ _e_fm2_cb_drag_finished(E_Drag *drag, int dropped __UNUSED__)
static void static void
_e_fm_drag_key_down_cb(E_Drag *drag, Ecore_Event_Key *e) _e_fm_drag_key_down_cb(E_Drag *drag, Ecore_Event_Key *e)
{ {
if (!strncmp(e->key, "Alt", 3)) #ifndef HAVE_WAYLAND_ONLY
if (!strncmp(e->keyname, "Alt", 3))
{ {
ecore_x_dnd_source_action_set(ECORE_X_ATOM_XDND_ACTION_ASK); ecore_x_dnd_source_action_set(ECORE_X_ATOM_XDND_ACTION_ASK);
e_drop_handler_action_set(ECORE_X_ATOM_XDND_ACTION_ASK); e_drop_handler_action_set(ECORE_X_ATOM_XDND_ACTION_ASK);
@ -7440,11 +7453,13 @@ _e_fm_drag_key_down_cb(E_Drag *drag, Ecore_Event_Key *e)
edje_object_signal_emit(drag->object, "e,state,copy", "e"); edje_object_signal_emit(drag->object, "e,state,copy", "e");
} }
} }
#endif
} }
static void static void
_e_fm_drag_key_up_cb(E_Drag *drag, Ecore_Event_Key *e) _e_fm_drag_key_up_cb(E_Drag *drag, Ecore_Event_Key *e)
{ {
#ifndef HAVE_WAYLAND_ONLY
Ecore_X_Atom act = ECORE_X_ATOM_XDND_ACTION_MOVE; Ecore_X_Atom act = ECORE_X_ATOM_XDND_ACTION_MOVE;
/* Default action would be move. ;) */ /* Default action would be move. ;) */
@ -7457,6 +7472,7 @@ _e_fm_drag_key_up_cb(E_Drag *drag, Ecore_Event_Key *e)
ecore_x_dnd_source_action_set(act); ecore_x_dnd_source_action_set(act);
e_drop_handler_action_set(act); e_drop_handler_action_set(act);
#endif
edje_object_signal_emit(drag->object, "e,state,move", "e"); edje_object_signal_emit(drag->object, "e,state,move", "e");
} }
@ -7631,8 +7647,9 @@ _e_fm2_cb_icon_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
d->x = ic->sd->x, d->y = ic->sd->y; d->x = ic->sd->x, d->y = ic->sd->y;
else else
d->x = ic->x + ic->sd->x - ic->sd->pos.x, d->y = ic->y + ic->sd->y - ic->sd->pos.y; d->x = ic->x + ic->sd->x - ic->sd->pos.x, d->y = ic->y + ic->sd->y - ic->sd->pos.y;
#ifndef HAVE_WAYLAND_ONLY
e_drop_handler_action_set(ECORE_X_ATOM_XDND_ACTION_MOVE); e_drop_handler_action_set(ECORE_X_ATOM_XDND_ACTION_MOVE);
#endif
e_drag_object_set(d, layout ?: o); e_drag_object_set(d, layout ?: o);
if (layout) if (layout)
{ {
@ -10299,7 +10316,9 @@ _e_fm2_icon_entry_widget_add(E_Fm2_Icon *ic)
ic->entry_widget = e_widget_entry_add(e, NULL, NULL, NULL, NULL); ic->entry_widget = e_widget_entry_add(e, NULL, NULL, NULL, NULL);
evas_object_event_callback_add(ic->entry_widget, EVAS_CALLBACK_KEY_DOWN, evas_object_event_callback_add(ic->entry_widget, EVAS_CALLBACK_KEY_DOWN,
_e_fm2_icon_entry_widget_cb_key_down, ic); _e_fm2_icon_entry_widget_cb_key_down, ic);
#ifndef HAVE_WAYLAND_ONLY
evas_event_feed_mouse_out(evas_object_evas_get(ic->obj), ecore_x_current_time_get(), NULL); evas_event_feed_mouse_out(evas_object_evas_get(ic->obj), ecore_x_current_time_get(), NULL);
#endif
if (c) if (c)
e_comp_grab_input(c, 0, 1); e_comp_grab_input(c, 0, 1);
ic->keygrab = !!c; ic->keygrab = !!c;
@ -10312,8 +10331,9 @@ _e_fm2_icon_entry_widget_add(E_Fm2_Icon *ic)
e_widget_entry_select_all(ic->entry_widget); e_widget_entry_select_all(ic->entry_widget);
ic->sd->iop_icon = ic; ic->sd->iop_icon = ic;
ic->sd->typebuf.disabled = EINA_TRUE; ic->sd->typebuf.disabled = EINA_TRUE;
#ifndef HAVE_WAYLAND_ONLY
evas_event_feed_mouse_in(e, ecore_x_current_time_get(), NULL); evas_event_feed_mouse_in(e, ecore_x_current_time_get(), NULL);
#endif
return ic->entry_widget; return ic->entry_widget;
} }

View File

@ -69,9 +69,11 @@ e_focus_event_focus_in(E_Client *ec)
if (!ec->button_grabbed) return; if (!ec->button_grabbed) return;
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec)); e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec)); e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 1, 0, 1); ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 1, 0, 1);
ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 2, 0, 1); ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 2, 0, 1);
ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 3, 0, 1); ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 3, 0, 1);
#endif
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec)); e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec)); e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
ec->button_grabbed = 0; ec->button_grabbed = 0;
@ -86,6 +88,7 @@ e_focus_event_focus_out(E_Client *ec)
(!e_config->always_click_to_focus)) (!e_config->always_click_to_focus))
{ {
if (ec->button_grabbed) return; if (ec->button_grabbed) return;
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_button_grab(e_client_util_pwin_get(ec), 1, ecore_x_window_button_grab(e_client_util_pwin_get(ec), 1,
ECORE_X_EVENT_MASK_MOUSE_DOWN | ECORE_X_EVENT_MASK_MOUSE_DOWN |
ECORE_X_EVENT_MASK_MOUSE_UP | ECORE_X_EVENT_MASK_MOUSE_UP |
@ -98,6 +101,7 @@ e_focus_event_focus_out(E_Client *ec)
ECORE_X_EVENT_MASK_MOUSE_DOWN | ECORE_X_EVENT_MASK_MOUSE_DOWN |
ECORE_X_EVENT_MASK_MOUSE_UP | ECORE_X_EVENT_MASK_MOUSE_UP |
ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
#endif
ec->button_grabbed = 1; ec->button_grabbed = 1;
} }
} }

View File

@ -72,7 +72,9 @@ _e_grab_dialog_free(E_Grab_Dialog *eg)
if (eg->grab_win) if (eg->grab_win)
{ {
e_grabinput_release(eg->grab_win, eg->grab_win); e_grabinput_release(eg->grab_win, eg->grab_win);
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_free(eg->grab_win); ecore_x_window_free(eg->grab_win);
#endif
} }
E_FREE_LIST(eg->handlers, ecore_event_handler_del); E_FREE_LIST(eg->handlers, ecore_event_handler_del);
@ -137,9 +139,11 @@ e_grab_dialog_show(E_Win *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key
e_object_del_attach_func_set(E_OBJECT(eg->dia), _e_grab_dialog_dia_del); e_object_del_attach_func_set(E_OBJECT(eg->dia), _e_grab_dialog_dia_del);
e_win_delete_callback_set(eg->dia->win, _e_grab_dialog_delete); e_win_delete_callback_set(eg->dia->win, _e_grab_dialog_delete);
#ifndef HAVE_WAYLAND_ONLY
eg->grab_win = ecore_x_window_input_new(c->man->root, 0, 0, 1, 1); eg->grab_win = ecore_x_window_input_new(c->man->root, 0, 0, 1, 1);
ecore_x_window_show(eg->grab_win); ecore_x_window_show(eg->grab_win);
e_grabinput_get(eg->grab_win, 0, eg->grab_win); e_grabinput_get(eg->grab_win, 0, eg->grab_win);
#endif
eg->key = key; eg->key = key;
eg->mouse = mouse; eg->mouse = mouse;

View File

@ -40,12 +40,16 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X) return 1; if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X) return 1;
if (grab_mouse_win) if (grab_mouse_win)
{ {
#ifndef HAVE_WAYLAND_ONLY
ecore_x_pointer_ungrab(); ecore_x_pointer_ungrab();
#endif
grab_mouse_win = 0; grab_mouse_win = 0;
} }
if (grab_key_win) if (grab_key_win)
{ {
#ifndef HAVE_WAYLAND_ONLY
ecore_x_keyboard_ungrab(); ecore_x_keyboard_ungrab();
#endif
grab_key_win = 0; grab_key_win = 0;
focus_win = 0; focus_win = 0;
} }
@ -53,15 +57,18 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
{ {
int ret = 0; int ret = 0;
#ifndef HAVE_WAYLAND_ONLY
if (confine_mouse) if (confine_mouse)
ret = ecore_x_pointer_confine_grab(mouse_win); ret = ecore_x_pointer_confine_grab(mouse_win);
else else
ret = ecore_x_pointer_grab(mouse_win); ret = ecore_x_pointer_grab(mouse_win);
#endif
if (!ret) return 0; if (!ret) return 0;
grab_mouse_win = mouse_win; grab_mouse_win = mouse_win;
} }
if (key_win) if (key_win)
{ {
#ifndef HAVE_WAYLAND_ONLY
int ret = 0; int ret = 0;
ret = ecore_x_keyboard_grab(key_win); ret = ecore_x_keyboard_grab(key_win);
@ -74,6 +81,7 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, Ecore_Window key_win)
} }
return 0; return 0;
} }
#endif
grab_key_win = key_win; grab_key_win = key_win;
} }
return 1; return 1;
@ -85,12 +93,16 @@ e_grabinput_release(Ecore_Window mouse_win, Ecore_Window key_win)
if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X) return; if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X) return;
if (mouse_win == grab_mouse_win) if (mouse_win == grab_mouse_win)
{ {
#ifndef HAVE_WAYLAND_ONLY
ecore_x_pointer_ungrab(); ecore_x_pointer_ungrab();
#endif
grab_mouse_win = 0; grab_mouse_win = 0;
} }
if (key_win == grab_key_win) if (key_win == grab_key_win)
{ {
#ifndef HAVE_WAYLAND_ONLY
ecore_x_keyboard_ungrab(); ecore_x_keyboard_ungrab();
#endif
grab_key_win = 0; grab_key_win = 0;
if (focus_win != 0) if (focus_win != 0)
{ {
@ -140,11 +152,13 @@ e_grabinput_key_win_get(void)
static Eina_Bool static Eina_Bool
_e_grabinput_focus_check(void *data __UNUSED__) _e_grabinput_focus_check(void *data __UNUSED__)
{ {
#ifndef HAVE_WAYLAND_ONLY
if (ecore_x_window_focus_get() != focus_fix_win) if (ecore_x_window_focus_get() != focus_fix_win)
{ {
/* fprintf(stderr, "foc do 2\n"); */ /* fprintf(stderr, "foc do 2\n"); */
_e_grabinput_focus_do(focus_fix_win, focus_fix_method); _e_grabinput_focus_do(focus_fix_win, focus_fix_method);
} }
#endif
focus_fix_timer = NULL; focus_fix_timer = NULL;
return EINA_FALSE; return EINA_FALSE;
} }
@ -159,16 +173,22 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
break; break;
case E_FOCUS_METHOD_LOCALLY_ACTIVE: case E_FOCUS_METHOD_LOCALLY_ACTIVE:
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_focus_at_time(win, ecore_x_current_time_get()); ecore_x_window_focus_at_time(win, ecore_x_current_time_get());
ecore_x_icccm_take_focus_send(win, ecore_x_current_time_get()); ecore_x_icccm_take_focus_send(win, ecore_x_current_time_get());
#endif
break; break;
case E_FOCUS_METHOD_GLOBALLY_ACTIVE: case E_FOCUS_METHOD_GLOBALLY_ACTIVE:
#ifndef HAVE_WAYLAND_ONLY
ecore_x_icccm_take_focus_send(win, ecore_x_current_time_get()); ecore_x_icccm_take_focus_send(win, ecore_x_current_time_get());
#endif
break; break;
case E_FOCUS_METHOD_PASSIVE: case E_FOCUS_METHOD_PASSIVE:
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_focus_at_time(win, ecore_x_current_time_get()); ecore_x_window_focus_at_time(win, ecore_x_current_time_get());
#endif
break; break;
default: default:

View File

@ -4,7 +4,7 @@
static void e_hints_openoffice_gnome_fake(Ecore_Window root); static void e_hints_openoffice_gnome_fake(Ecore_Window root);
//static void e_hints_openoffice_kde_fake(Ecore_Window root); //static void e_hints_openoffice_kde_fake(Ecore_Window root);
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
static void e_hints_e16_comms_pretend(Ecore_X_Window root, Ecore_X_Window propwin); static void e_hints_e16_comms_pretend(Ecore_X_Window root, Ecore_X_Window propwin);
EAPI Ecore_X_Atom ATM__QTOPIA_SOFT_MENU = 0; EAPI Ecore_X_Atom ATM__QTOPIA_SOFT_MENU = 0;
@ -18,7 +18,7 @@ EAPI Ecore_X_Atom ATM_ENLIGHTENMENT_SCALE = 0;
EINTERN void EINTERN void
e_hints_init(Ecore_Window root, Ecore_Window propwin) e_hints_init(Ecore_Window root, Ecore_Window propwin)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
const char *atom_names[] = { const char *atom_names[] = {
"_QTOPIA_SOFT_MENU", "_QTOPIA_SOFT_MENU",
@ -210,7 +210,7 @@ e_hints_init(Ecore_Window root, Ecore_Window propwin)
#endif #endif
} }
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
/* /*
* This is here so we don't have to pretend to be Kwin anymore - we pretend * This is here so we don't have to pretend to be Kwin anymore - we pretend
* to do old e16 style ipc. in fact we just ignore it... but set up the * to do old e16 style ipc. in fact we just ignore it... but set up the
@ -286,7 +286,7 @@ e_hints_manager_init(E_Manager *man)
EAPI void EAPI void
e_hints_client_list_set(void) e_hints_client_list_set(void)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
E_Manager *man; E_Manager *man;
const Eina_List *l; const Eina_List *l;
@ -321,7 +321,7 @@ e_hints_client_list_set(void)
EAPI void EAPI void
e_hints_client_stacking_set(void) e_hints_client_stacking_set(void)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
E_Comp *comp; E_Comp *comp;
const Eina_List *l; const Eina_List *l;
@ -387,7 +387,7 @@ EAPI void
e_hints_active_window_set(E_Manager *man, e_hints_active_window_set(E_Manager *man,
E_Client *ec) E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
E_OBJECT_CHECK(man); E_OBJECT_CHECK(man);
if (e_comp_get(man)->comp_type != E_PIXMAP_TYPE_X) return; if (e_comp_get(man)->comp_type != E_PIXMAP_TYPE_X) return;
@ -401,7 +401,7 @@ e_hints_active_window_set(E_Manager *man,
EINTERN void EINTERN void
e_hints_window_init(E_Client *ec) e_hints_window_init(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
E_Remember *rem = NULL; E_Remember *rem = NULL;
@ -577,7 +577,7 @@ e_hints_window_init(E_Client *ec)
EAPI void EAPI void
e_hints_window_state_set(E_Client *ec) e_hints_window_state_set(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
Ecore_X_Window_State state[10]; Ecore_X_Window_State state[10];
int num = 0; int num = 0;
@ -623,7 +623,7 @@ e_hints_window_state_set(E_Client *ec)
EAPI void EAPI void
e_hints_allowed_action_set(E_Client *ec) e_hints_allowed_action_set(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
Ecore_X_Action action[10]; Ecore_X_Action action[10];
int num = 0; int num = 0;
@ -657,7 +657,7 @@ e_hints_allowed_action_set(E_Client *ec)
EAPI void EAPI void
e_hints_window_type_set(E_Client *ec) e_hints_window_type_set(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
ecore_x_netwm_window_type_set(e_client_util_win_get(ec), ec->netwm.type); ecore_x_netwm_window_type_set(e_client_util_win_get(ec), ec->netwm.type);
@ -667,7 +667,7 @@ e_hints_window_type_set(E_Client *ec)
EAPI void EAPI void
e_hints_window_type_get(E_Client *ec) e_hints_window_type_get(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
Ecore_X_Window_Type *types = NULL; Ecore_X_Window_Type *types = NULL;
int num, i, j; int num, i, j;
@ -712,13 +712,10 @@ e_hints_window_type_get(E_Client *ec)
#endif #endif
} }
#ifdef E_COMP_X_H
EAPI void EAPI void
e_hints_window_state_update(E_Client *ec, e_hints_window_state_update(E_Client *ec, int state, int action)
Ecore_X_Window_State state,
Ecore_X_Window_State_Action action)
{ {
#ifdef WAYLAND_ONLY
#else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
switch (state) switch (state)
{ {
@ -976,13 +973,13 @@ e_hints_window_state_update(E_Client *ec,
/* Ignore */ /* Ignore */
break; break;
} }
#endif
} }
#endif
EAPI void EAPI void
e_hints_window_state_get(E_Client *ec) e_hints_window_state_get(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
unsigned int i, num; unsigned int i, num;
Ecore_X_Window_State *state; Ecore_X_Window_State *state;
@ -1069,10 +1066,9 @@ e_hints_window_state_get(E_Client *ec)
} }
EAPI void EAPI void
e_hints_allowed_action_update(E_Client *ec, e_hints_allowed_action_update(E_Client *ec, int action)
Ecore_X_Action action)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
switch (action) switch (action)
@ -1119,7 +1115,7 @@ e_hints_allowed_action_update(E_Client *ec,
EAPI void EAPI void
e_hints_allowed_action_get(E_Client *ec) e_hints_allowed_action_get(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
Ecore_X_Action *action; Ecore_X_Action *action;
unsigned int i; unsigned int i;
@ -1211,7 +1207,7 @@ _e_hints_process_wakeup(E_Client *ec)
EAPI void EAPI void
e_hints_window_visible_set(E_Client *ec) e_hints_window_visible_set(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_NORMAL) if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_NORMAL)
@ -1230,7 +1226,7 @@ e_hints_window_visible_set(E_Client *ec)
EAPI void EAPI void
e_hints_window_iconic_set(E_Client *ec) e_hints_window_iconic_set(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_ICONIC) if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_ICONIC)
@ -1249,7 +1245,7 @@ e_hints_window_iconic_set(E_Client *ec)
EAPI void EAPI void
e_hints_window_hidden_set(E_Client *ec) e_hints_window_hidden_set(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_WITHDRAWN) if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
@ -1268,7 +1264,7 @@ e_hints_window_hidden_set(E_Client *ec)
EAPI void EAPI void
e_hints_window_shaded_set(E_Client *ec, int on) e_hints_window_shaded_set(E_Client *ec, int on)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
if ((!ec->netwm.state.shaded) && (on)) if ((!ec->netwm.state.shaded) && (on))
@ -1294,7 +1290,7 @@ e_hints_window_shaded_set(E_Client *ec, int on)
EAPI void EAPI void
e_hints_window_shade_direction_set(E_Client *ec, E_Direction dir) e_hints_window_shade_direction_set(E_Client *ec, E_Direction dir)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
ecore_x_window_prop_card32_set(e_client_util_win_get(ec), E_ATOM_SHADE_DIRECTION, &dir, 1); ecore_x_window_prop_card32_set(e_client_util_win_get(ec), E_ATOM_SHADE_DIRECTION, &dir, 1);
@ -1304,7 +1300,7 @@ e_hints_window_shade_direction_set(E_Client *ec, E_Direction dir)
EAPI E_Direction EAPI E_Direction
e_hints_window_shade_direction_get(E_Client *ec) e_hints_window_shade_direction_get(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
int ret; int ret;
E_Direction dir; E_Direction dir;
@ -1315,15 +1311,14 @@ e_hints_window_shade_direction_get(E_Client *ec)
&dir, 1); &dir, 1);
if (ret == 1) if (ret == 1)
return dir; return dir;
return E_DIRECTION_UP;
#endif #endif
return E_DIRECTION_UP;
} }
EAPI void EAPI void
e_hints_window_size_set(E_Client *ec) e_hints_window_size_set(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
unsigned int sizes[4]; unsigned int sizes[4];
@ -1339,7 +1334,7 @@ e_hints_window_size_set(E_Client *ec)
EAPI void EAPI void
e_hints_window_size_unset(E_Client *ec) e_hints_window_size_unset(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
ecore_x_window_prop_property_del(e_client_util_win_get(ec), E_ATOM_BORDER_SIZE); ecore_x_window_prop_property_del(e_client_util_win_get(ec), E_ATOM_BORDER_SIZE);
@ -1349,7 +1344,7 @@ e_hints_window_size_unset(E_Client *ec)
EAPI int EAPI int
e_hints_window_size_get(E_Client *ec) e_hints_window_size_get(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
int ret; int ret;
unsigned int sizes[4]; unsigned int sizes[4];
@ -1365,15 +1360,15 @@ e_hints_window_size_get(E_Client *ec)
ec->y = sizes[1]; ec->y = sizes[1];
ec->w = sizes[2]; ec->w = sizes[2];
ec->h = sizes[3]; ec->h = sizes[3];
#endif
return 1; return 1;
#endif
} }
EAPI void EAPI void
e_hints_window_maximized_set(E_Client *ec, int horizontal, int vertical) e_hints_window_maximized_set(E_Client *ec, int horizontal, int vertical)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
if ((horizontal) && (!ec->netwm.state.maximized_h)) if ((horizontal) && (!ec->netwm.state.maximized_h))
@ -1407,7 +1402,7 @@ EAPI void
e_hints_window_fullscreen_set(E_Client *ec, e_hints_window_fullscreen_set(E_Client *ec,
int on) int on)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
if ((!ec->netwm.state.fullscreen) && (on)) if ((!ec->netwm.state.fullscreen) && (on))
@ -1428,7 +1423,7 @@ e_hints_window_fullscreen_set(E_Client *ec,
EAPI void EAPI void
e_hints_window_sticky_set(E_Client *ec, int on) e_hints_window_sticky_set(E_Client *ec, int on)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
if ((!ec->netwm.state.sticky) && (on)) if ((!ec->netwm.state.sticky) && (on))
@ -1449,7 +1444,7 @@ e_hints_window_sticky_set(E_Client *ec, int on)
EAPI void EAPI void
e_hints_window_stacking_set(E_Client *ec, E_Stacking stacking) e_hints_window_stacking_set(E_Client *ec, E_Stacking stacking)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
if (ec->netwm.state.stacking == stacking) return; if (ec->netwm.state.stacking == stacking) return;
@ -1462,7 +1457,7 @@ e_hints_window_stacking_set(E_Client *ec, E_Stacking stacking)
EAPI void EAPI void
e_hints_window_desktop_set(E_Client *ec) e_hints_window_desktop_set(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
/* This function is only called when really changing desktop, /* This function is only called when really changing desktop,
* so just set the property and don't care about the roundtrip. * so just set the property and don't care about the roundtrip.
@ -1489,7 +1484,7 @@ e_hints_window_desktop_set(E_Client *ec)
EAPI void EAPI void
e_hints_window_e_state_get(E_Client *ec) e_hints_window_e_state_get(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
/* Remember to update the count if we add more states! */ /* Remember to update the count if we add more states! */
Ecore_X_Atom state[1]; Ecore_X_Atom state[1];
@ -1524,7 +1519,7 @@ e_hints_window_e_state_set(E_Client *ec __UNUSED__)
EAPI void EAPI void
e_hints_window_qtopia_soft_menu_get(E_Client *ec) e_hints_window_qtopia_soft_menu_get(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
unsigned int val; unsigned int val;
@ -1539,7 +1534,7 @@ e_hints_window_qtopia_soft_menu_get(E_Client *ec)
EAPI void EAPI void
e_hints_window_qtopia_soft_menus_get(E_Client *ec) e_hints_window_qtopia_soft_menus_get(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
unsigned int val; unsigned int val;
@ -1554,7 +1549,7 @@ e_hints_window_qtopia_soft_menus_get(E_Client *ec)
EAPI void EAPI void
e_hints_window_virtual_keyboard_state_get(E_Client *ec) e_hints_window_virtual_keyboard_state_get(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
Ecore_X_Atom atom = 0; Ecore_X_Atom atom = 0;
@ -1572,7 +1567,7 @@ e_hints_window_virtual_keyboard_state_get(E_Client *ec)
EAPI void EAPI void
e_hints_window_virtual_keyboard_get(E_Client *ec) e_hints_window_virtual_keyboard_get(E_Client *ec)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!e_pixmap_is_x(ec->pixmap)) return; if (!e_pixmap_is_x(ec->pixmap)) return;
ec->vkbd.vkbd = ecore_x_e_virtual_keyboard_get(e_client_util_win_get(ec)); ec->vkbd.vkbd = ecore_x_e_virtual_keyboard_get(e_client_util_win_get(ec));
@ -1582,7 +1577,7 @@ e_hints_window_virtual_keyboard_get(E_Client *ec)
static void static void
e_hints_openoffice_gnome_fake(Ecore_Window root) e_hints_openoffice_gnome_fake(Ecore_Window root)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
const char *string = "ATM_GNOME_SM_PROXY"; const char *string = "ATM_GNOME_SM_PROXY";
@ -1595,7 +1590,7 @@ e_hints_openoffice_gnome_fake(Ecore_Window root)
static void static void
e_hints_openoffice_kde_fake(Ecore_Window root) e_hints_openoffice_kde_fake(Ecore_Window root)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
Ecore_X_Window win2; Ecore_X_Window win2;
@ -1608,7 +1603,7 @@ e_hints_openoffice_kde_fake(Ecore_Window root)
EAPI void EAPI void
e_hints_scale_update(void) e_hints_scale_update(void)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
E_Comp *c; E_Comp *c;
const Eina_List *l; const Eina_List *l;

View File

@ -48,7 +48,7 @@ EAPI void e_hints_scale_update(void);
#ifdef E_COMP_X_H #ifdef E_COMP_X_H
EAPI void e_hints_window_state_update(E_Client *ec, Ecore_X_Window_State state, Ecore_X_Window_State_Action action); EAPI void e_hints_window_state_update(E_Client *ec, int state, int action);
extern EAPI Ecore_X_Atom ATM__QTOPIA_SOFT_MENU; extern EAPI Ecore_X_Atom ATM__QTOPIA_SOFT_MENU;
extern EAPI Ecore_X_Atom ATM__QTOPIA_SOFT_MENUS; extern EAPI Ecore_X_Atom ATM__QTOPIA_SOFT_MENUS;
extern EAPI Ecore_X_Atom ATM_GNOME_SM_PROXY; extern EAPI Ecore_X_Atom ATM_GNOME_SM_PROXY;

View File

@ -8,7 +8,7 @@
#include "e_zone.h" #include "e_zone.h"
#include "e_desk.h" #include "e_desk.h"
#include "e_auth.h" #include "e_auth.h"
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
# include "e_comp_x.h" # include "e_comp_x.h"
#endif #endif
#include "e_pixmap.h" #include "e_pixmap.h"
@ -154,3 +154,4 @@
#include "e_comp_cfdata.h" #include "e_comp_cfdata.h"
#include "e_comp_canvas.h" #include "e_comp_canvas.h"
#include "e_utils.h" #include "e_utils.h"
#include "e_hints.h"

View File

@ -145,6 +145,7 @@ _create_data(E_Dialog *cfd, E_Client *ec)
cfdata->client->icccm.max_aspect); cfdata->client->icccm.max_aspect);
cfdata->icccm.aspect = strdup(buf); cfdata->icccm.aspect = strdup(buf);
} }
#ifdef E_COMP_X_H
if (cfdata->client->icccm.initial_state != ECORE_X_WINDOW_STATE_HINT_NONE) if (cfdata->client->icccm.initial_state != ECORE_X_WINDOW_STATE_HINT_NONE)
{ {
switch (cfdata->client->icccm.initial_state) switch (cfdata->client->icccm.initial_state)
@ -189,6 +190,7 @@ _create_data(E_Dialog *cfd, E_Client *ec)
} }
cfdata->icccm.state = strdup(buf); cfdata->icccm.state = strdup(buf);
} }
#endif
snprintf(buf, sizeof(buf), "0x%08x", snprintf(buf, sizeof(buf), "0x%08x",
(unsigned int)e_client_util_win_get(cfdata->client)); (unsigned int)e_client_util_win_get(cfdata->client));
cfdata->icccm.window_id = strdup(buf); cfdata->icccm.window_id = strdup(buf);
@ -210,6 +212,7 @@ _create_data(E_Dialog *cfd, E_Client *ec)
(unsigned int)cfdata->client->icccm.client_leader); (unsigned int)cfdata->client->icccm.client_leader);
cfdata->icccm.client_leader = strdup(buf); cfdata->icccm.client_leader = strdup(buf);
} }
#ifdef E_COMP_X_H
switch (cfdata->client->icccm.gravity) switch (cfdata->client->icccm.gravity)
{ {
case ECORE_X_GRAVITY_FORGET: case ECORE_X_GRAVITY_FORGET:
@ -261,6 +264,7 @@ _create_data(E_Dialog *cfd, E_Client *ec)
break; break;
} }
cfdata->icccm.gravity = strdup(buf); cfdata->icccm.gravity = strdup(buf);
#endif
if (cfdata->client->icccm.command.argv) if (cfdata->client->icccm.command.argv)
{ {
int i; int i;

View File

@ -1490,6 +1490,7 @@ _e_main_screens_init(void)
if (!e_client_init()) return 0; if (!e_client_init()) return 0;
TS("\tscreens: win"); TS("\tscreens: win");
if (!e_win_init()) return 0; if (!e_win_init()) return 0;
#ifndef HAVE_WAYLAND_ONLY
TS("E_Xkb Init"); TS("E_Xkb Init");
if (!e_xkb_init()) if (!e_xkb_init())
{ {
@ -1497,6 +1498,7 @@ _e_main_screens_init(void)
_e_main_shutdown(-1); _e_main_shutdown(-1);
} }
TS("E_Xkb Init Done"); TS("E_Xkb Init Done");
#endif
TS("Compositor Init"); TS("Compositor Init");
if (!e_comp_init()) if (!e_comp_init())
@ -1507,6 +1509,7 @@ _e_main_screens_init(void)
_e_main_desk_restore(); _e_main_desk_restore();
#ifndef HAVE_WAYLAND_ONLY
if (e_config->show_splash) if (e_config->show_splash)
e_init_status_set(_("Setup DND")); e_init_status_set(_("Setup DND"));
TS("E_Dnd Init"); TS("E_Dnd Init");
@ -1517,6 +1520,7 @@ _e_main_screens_init(void)
} }
TS("E_Dnd Init Done"); TS("E_Dnd Init Done");
_e_main_shutdown_push(e_dnd_shutdown); _e_main_shutdown_push(e_dnd_shutdown);
#endif
return 1; return 1;
} }
@ -1703,7 +1707,9 @@ static Eina_Bool
_e_main_cb_x_flusher(void *data __UNUSED__) _e_main_cb_x_flusher(void *data __UNUSED__)
{ {
eet_clearcache(); eet_clearcache();
#ifndef HAVE_WAYLAND_ONLY
ecore_x_flush(); ecore_x_flush();
#endif
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }

View File

@ -972,7 +972,8 @@ _e_module_whitelist_check(void)
known++; known++;
} }
{ #ifndef HAVE_WAYLAND_ONLY
{
Ecore_X_Atom _x_tainted; Ecore_X_Atom _x_tainted;
char *state; char *state;
unsigned int _e_tainted; unsigned int _e_tainted;
@ -986,6 +987,7 @@ _e_module_whitelist_check(void)
e_env_set("E19_TAINTED", state); e_env_set("E19_TAINTED", state);
} }
#endif
if (eina_list_count(badl) != known) if (eina_list_count(badl) != known)
{ {

View File

@ -6,12 +6,14 @@ e_mouse_update(void)
unsigned char map[256] = { 0 }; unsigned char map[256] = { 0 };
int n; int n;
#ifndef HAVE_WAYLAND_ONLY
if (!ecore_x_pointer_control_set(e_config->mouse_accel_numerator, if (!ecore_x_pointer_control_set(e_config->mouse_accel_numerator,
e_config->mouse_accel_denominator, e_config->mouse_accel_denominator,
e_config->mouse_accel_threshold)) e_config->mouse_accel_threshold))
return 0; return 0;
if (!ecore_x_pointer_mapping_get(map, 256)) return 0; if (!ecore_x_pointer_mapping_get(map, 256)) return 0;
#endif
for (n = 0; n < 256; n++) for (n = 0; n < 256; n++)
{ {
@ -35,7 +37,9 @@ e_mouse_update(void)
map[2] = 1; map[2] = 1;
} }
#ifndef HAVE_WAYLAND_ONLY
if (!ecore_x_pointer_mapping_set(map, n)) return 0; if (!ecore_x_pointer_mapping_set(map, n)) return 0;
#endif
return 1; return 1;
} }

View File

@ -3,7 +3,7 @@
#ifdef HAVE_WAYLAND_CLIENTS #ifdef HAVE_WAYLAND_CLIENTS
# include "e_comp_wl.h" # include "e_comp_wl.h"
#endif #endif
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
# include "e_comp_x.h" # include "e_comp_x.h"
#endif #endif
@ -23,7 +23,7 @@ struct _E_Pixmap
#ifdef HAVE_WAYLAND_CLIENTS #ifdef HAVE_WAYLAND_CLIENTS
struct wl_resource *resource; struct wl_resource *resource;
#endif #endif
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
uint32_t pixmap; uint32_t pixmap;
#endif #endif
int w, h; int w, h;
@ -44,7 +44,7 @@ _e_pixmap_clear(E_Pixmap *cp, Eina_Bool cache)
cp->image_argb = EINA_FALSE; cp->image_argb = EINA_FALSE;
switch (cp->type) switch (cp->type)
{ {
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
if (cp->pixmap) if (cp->pixmap)
{ {
@ -64,7 +64,7 @@ _e_pixmap_clear(E_Pixmap *cp, Eina_Bool cache)
} }
} }
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
static void static void
_e_pixmap_image_clear_x(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) _e_pixmap_image_clear_x(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{ {
@ -78,7 +78,7 @@ _e_pixmap_free(E_Pixmap *cp)
switch (cp->type) switch (cp->type)
{ {
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (!cp->images_cache) break; if (!cp->images_cache) break;
if (cp->client) if (cp->client)
evas_object_event_callback_add(cp->client->frame, EVAS_CALLBACK_FREE, _e_pixmap_image_clear_x, cp->images_cache); evas_object_event_callback_add(cp->client->frame, EVAS_CALLBACK_FREE, _e_pixmap_image_clear_x, cp->images_cache);
@ -121,7 +121,7 @@ _e_pixmap_new(E_Pixmap_Type type)
static E_Pixmap * static E_Pixmap *
_e_pixmap_find(E_Pixmap_Type type, va_list *l) _e_pixmap_find(E_Pixmap_Type type, va_list *l)
{ {
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
Ecore_X_Window xwin; Ecore_X_Window xwin;
#endif #endif
#ifdef HAVE_WAYLAND_CLIENTS #ifdef HAVE_WAYLAND_CLIENTS
@ -131,7 +131,7 @@ _e_pixmap_find(E_Pixmap_Type type, va_list *l)
if (!pixmaps[type]) return NULL; if (!pixmaps[type]) return NULL;
switch (type) switch (type)
{ {
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
xwin = va_arg(*l, uint32_t); xwin = va_arg(*l, uint32_t);
return eina_hash_find(pixmaps[type], &xwin); return eina_hash_find(pixmaps[type], &xwin);
@ -155,7 +155,7 @@ e_pixmap_free(E_Pixmap *cp)
switch (cp->type) switch (cp->type)
{ {
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (cp->parent) eina_hash_set(pixmaps[cp->type], &cp->parent, NULL); if (cp->parent) eina_hash_set(pixmaps[cp->type], &cp->parent, NULL);
#endif #endif
break; break;
@ -182,7 +182,7 @@ e_pixmap_new(E_Pixmap_Type type, ...)
{ {
E_Pixmap *cp = NULL; E_Pixmap *cp = NULL;
va_list l; va_list l;
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
Ecore_X_Window xwin; Ecore_X_Window xwin;
#endif #endif
#ifdef HAVE_WAYLAND_CLIENTS #ifdef HAVE_WAYLAND_CLIENTS
@ -194,7 +194,7 @@ e_pixmap_new(E_Pixmap_Type type, ...)
switch (type) switch (type)
{ {
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
xwin = va_arg(l, uint32_t); xwin = va_arg(l, uint32_t);
if (pixmaps[type]) if (pixmaps[type])
{ {
@ -323,7 +323,7 @@ e_pixmap_refresh(E_Pixmap *cp)
switch (cp->type) switch (cp->type)
{ {
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
{ {
uint32_t pixmap; uint32_t pixmap;
@ -482,7 +482,7 @@ e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns)
switch (cp->type) switch (cp->type)
{ {
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
ns->type = EVAS_NATIVE_SURFACE_X11; ns->type = EVAS_NATIVE_SURFACE_X11;
ns->data.x11.visual = cp->visual; ns->data.x11.visual = cp->visual;
ns->data.x11.pixmap = cp->pixmap; ns->data.x11.pixmap = cp->pixmap;
@ -518,7 +518,7 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache)
switch (cp->type) switch (cp->type)
{ {
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (cache) if (cache)
{ {
void *i; void *i;
@ -578,7 +578,7 @@ e_pixmap_image_refresh(E_Pixmap *cp)
switch (cp->type) switch (cp->type)
{ {
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if ((!cp->visual) || (!cp->client->depth)) return EINA_FALSE; if ((!cp->visual) || (!cp->client->depth)) return EINA_FALSE;
cp->image = ecore_x_image_new(cp->w, cp->h, cp->visual, cp->client->depth); cp->image = ecore_x_image_new(cp->w, cp->h, cp->visual, cp->client->depth);
if (cp->image) if (cp->image)
@ -629,7 +629,7 @@ e_pixmap_image_data_get(E_Pixmap *cp)
switch (cp->type) switch (cp->type)
{ {
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
return ecore_x_image_data_get(cp->image, &cp->ibpl, NULL, &cp->ibpp); return ecore_x_image_data_get(cp->image, &cp->ibpl, NULL, &cp->ibpp);
#endif #endif
break; break;
@ -653,11 +653,13 @@ e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void *ipix, Eina_Recta
switch (cp->type) switch (cp->type)
{ {
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
#ifndef HAVE_WAYLAND_ONLY
if (cp->image_argb) return EINA_FALSE; if (cp->image_argb) return EINA_FALSE;
return ecore_x_image_to_argb_convert(ipix, cp->ibpp, cp->ibpl, return ecore_x_image_to_argb_convert(ipix, cp->ibpp, cp->ibpl,
cp->cmap, cp->visual, cp->cmap, cp->visual,
r->x, r->y, r->w, r->h, r->x, r->y, r->w, r->h,
pix, stride, r->x, r->y); pix, stride, r->x, r->y);
#endif
case E_PIXMAP_TYPE_WL: case E_PIXMAP_TYPE_WL:
return EINA_TRUE; //already guaranteed to be argb return EINA_TRUE; //already guaranteed to be argb
default: default:
@ -674,8 +676,10 @@ e_pixmap_image_draw(E_Pixmap *cp, const Eina_Rectangle *r)
switch (cp->type) switch (cp->type)
{ {
case E_PIXMAP_TYPE_X: case E_PIXMAP_TYPE_X:
#ifndef HAVE_WAYLAND_ONLY
if (!cp->pixmap) return EINA_FALSE; if (!cp->pixmap) return EINA_FALSE;
return ecore_x_image_get(cp->image, cp->pixmap, r->x, r->y, r->x, r->y, r->w, r->h); return ecore_x_image_get(cp->image, cp->pixmap, r->x, r->y, r->x, r->y, r->w, r->h);
#endif
case E_PIXMAP_TYPE_WL: case E_PIXMAP_TYPE_WL:
return EINA_TRUE; //this call is a NOP return EINA_TRUE; //this call is a NOP
default: default:

View File

@ -228,7 +228,7 @@ _e_pointer_type_set(E_Pointer *p,
/* Do not set type if in "hidden mode" */ /* Do not set type if in "hidden mode" */
if (!e_config->show_cursor) if (!e_config->show_cursor)
{ {
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
evas_object_hide(p->pointer_image); evas_object_hide(p->pointer_image);
#else #else
if (!p->canvas) if (!p->canvas)
@ -266,7 +266,7 @@ _e_pointer_type_set(E_Pointer *p,
return; return;
} }
fallback: fallback:
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (p->canvas) return; if (p->canvas) return;
{ {
Ecore_X_Cursor cursor = 0; Ecore_X_Cursor cursor = 0;
@ -315,6 +315,7 @@ fallback:
if (cursor) ecore_x_cursor_free(cursor); if (cursor) ecore_x_cursor_free(cursor);
} }
#endif #endif
return;
} }
static void static void
@ -440,15 +441,16 @@ _e_pointer_idle_timer(void *data)
return EINA_TRUE; return EINA_TRUE;
} }
#ifndef WAYLAND_ONLY
static Eina_Bool static Eina_Bool
_e_pointer_cb_idle_timer_pre(void *data) _e_pointer_cb_idle_timer_pre(void *data)
{ {
E_Pointer *p; E_Pointer *p;
int x, y; int x = 0, y = 0;
if (!(p = data)) return ECORE_CALLBACK_RENEW; if (!(p = data)) return ECORE_CALLBACK_RENEW;
#ifndef HAVE_WAYLAND_ONLY
ecore_x_pointer_xy_get(p->win, &x, &y); ecore_x_pointer_xy_get(p->win, &x, &y);
#endif
p->x = x; p->x = x;
p->y = y; p->y = y;
if (p->canvas) if (p->canvas)
@ -486,7 +488,7 @@ static Eina_Bool
_e_pointer_cb_idle_poller(void *data) _e_pointer_cb_idle_poller(void *data)
{ {
E_Pointer *p; E_Pointer *p;
int x, y; int x = 0, y = 0;
if (!(p = data)) return ECORE_CALLBACK_RENEW; if (!(p = data)) return ECORE_CALLBACK_RENEW;
if ((e_powersave_mode_get() >= E_POWERSAVE_MODE_MEDIUM) || if ((e_powersave_mode_get() >= E_POWERSAVE_MODE_MEDIUM) ||
@ -495,9 +497,11 @@ _e_pointer_cb_idle_poller(void *data)
p->idle_poller = NULL; p->idle_poller = NULL;
return ECORE_CALLBACK_CANCEL; return ECORE_CALLBACK_CANCEL;
} }
#ifndef HAVE_WAYLAND_ONLY
/* check if pointer actually moved since the 1 second post-mouse move idle /* check if pointer actually moved since the 1 second post-mouse move idle
* pre-timer that fetches the position */ * pre-timer that fetches the position */
ecore_x_pointer_xy_get(p->win, &x, &y); ecore_x_pointer_xy_get(p->win, &x, &y);
#endif
if ((x != p->x) || (y != p->y)) if ((x != p->x) || (y != p->y))
{ {
/* it moved - so we are not idle yet - record position and wait /* it moved - so we are not idle yet - record position and wait
@ -515,7 +519,6 @@ _e_pointer_cb_idle_poller(void *data)
_e_pointer_idle(p); _e_pointer_idle(p);
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }
#endif
/* externally accessible functions */ /* externally accessible functions */
@ -561,7 +564,7 @@ e_pointer_window_new(Ecore_Window win,
p->color = c->pointer->color; p->color = c->pointer->color;
} }
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
ecore_x_cursor_size_set(e_config->cursor_size * 3 / 4); ecore_x_cursor_size_set(e_config->cursor_size * 3 / 4);
#endif #endif
if (filled) e_pointer_type_push(p, p, "default"); if (filled) e_pointer_type_push(p, p, "default");
@ -653,7 +656,7 @@ e_pointer_image_set(E_Pointer *p, E_Pixmap *cp, int w, int h, int hot_x, int hot
evas_object_show(p->pointer_image); evas_object_show(p->pointer_image);
} }
} }
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
else if (!p->e_cursor) else if (!p->e_cursor)
{ {
Ecore_X_Cursor cur; Ecore_X_Cursor cur;
@ -685,7 +688,7 @@ e_pointers_size_set(int size)
if (!p->canvas) if (!p->canvas)
_e_pointer_canvas_resize(p, size, size); _e_pointer_canvas_resize(p, size, size);
} }
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
else else
ecore_x_cursor_size_set(e_config->cursor_size * 3 / 4); ecore_x_cursor_size_set(e_config->cursor_size * 3 / 4);
#endif #endif
@ -703,7 +706,7 @@ EAPI void
e_pointer_hide(E_Pointer *p) e_pointer_hide(E_Pointer *p)
{ {
if (!p) return; if (!p) return;
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (p->win) ecore_x_window_cursor_set(p->win, 0); if (p->win) ecore_x_window_cursor_set(p->win, 0);
#endif #endif
@ -727,7 +730,7 @@ e_pointer_type_push(E_Pointer *p,
if (!p->canvas) if (!p->canvas)
{ {
evas_object_hide(p->pointer_image); evas_object_hide(p->pointer_image);
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (p->blocks) if (p->blocks)
{ {
ecore_x_cursor_size_set(e_config->cursor_size * 3 / 4); ecore_x_cursor_size_set(e_config->cursor_size * 3 / 4);
@ -779,7 +782,7 @@ e_pointer_type_pop(E_Pointer *p,
if (p->pointer_image) if (p->pointer_image)
{ {
evas_object_show(p->pointer_image); evas_object_show(p->pointer_image);
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (!p->canvas) if (!p->canvas)
{ {
int w, h; int w, h;
@ -801,7 +804,7 @@ e_pointer_type_pop(E_Pointer *p,
EAPI void EAPI void
e_pointer_idler_before(void) e_pointer_idler_before(void)
{ {
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
Eina_List *l; Eina_List *l;
E_Pointer *p; E_Pointer *p;

View File

@ -18,12 +18,14 @@ e_scale_shutdown(void)
EAPI void EAPI void
e_scale_update(void) e_scale_update(void)
{ {
int dpi; int dpi = 0;
char buf[128]; char buf[128];
if (e_config->scale.use_dpi) if (e_config->scale.use_dpi)
{ {
#ifndef HAVE_WAYLAND_ONLY
dpi = ecore_x_dpi_get(); dpi = ecore_x_dpi_get();
#endif
e_scale = (double)dpi / (double)e_config->scale.base_dpi; e_scale = (double)dpi / (double)e_config->scale.base_dpi;
if (e_scale > e_config->scale.max) e_scale = e_config->scale.max; if (e_scale > e_config->scale.max) e_scale = e_config->scale.max;
else if (e_scale < e_config->scale.min) else if (e_scale < e_config->scale.min)

View File

@ -82,9 +82,9 @@ e_screensaver_update(void)
changed = EINA_TRUE; changed = EINA_TRUE;
} }
if (changed) #ifdef HAVE_WAYLAND_ONLY
#ifdef WAYLAND_ONLY
#else #else
if (changed)
ecore_x_screensaver_set(timeout, interval, blanking, expose); ecore_x_screensaver_set(timeout, interval, blanking, expose);
#endif #endif
} }
@ -93,7 +93,7 @@ EAPI void
e_screensaver_force_update(void) e_screensaver_force_update(void)
{ {
int timeout = e_screensaver_timeout_get(EINA_TRUE); int timeout = e_screensaver_timeout_get(EINA_TRUE);
#ifdef WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
if (!getenv("DISPLAY")) return; if (!getenv("DISPLAY")) return;
ecore_x_screensaver_set(timeout + 10, ecore_x_screensaver_set(timeout + 10,

View File

@ -14,6 +14,7 @@ static volatile Eina_Bool _e_x_composite_shutdown_try = 0;
static void static void
_e_x_composite_shutdown(void) _e_x_composite_shutdown(void)
{ {
#ifdef E_COMP_X_H
// Ecore_X_Display *dpy; // Ecore_X_Display *dpy;
Ecore_X_Window root; Ecore_X_Window root;
@ -26,6 +27,7 @@ _e_x_composite_shutdown(void)
/* ignore errors, we really don't care at this point */ /* ignore errors, we really don't care at this point */
ecore_x_composite_unredirect_subwindows(root, ECORE_X_COMPOSITE_UPDATE_MANUAL); ecore_x_composite_unredirect_subwindows(root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
_e_x_composite_shutdown_try = 0; _e_x_composite_shutdown_try = 0;
#endif
} }
#if 0 #if 0
@ -64,10 +66,12 @@ EAPI void
e_sigseg_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__) e_sigseg_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
{ {
_e_x_composite_shutdown(); _e_x_composite_shutdown();
#ifdef E_COMP_X_H
ecore_x_pointer_ungrab(); ecore_x_pointer_ungrab();
ecore_x_keyboard_ungrab(); ecore_x_keyboard_ungrab();
ecore_x_ungrab(); ecore_x_ungrab();
ecore_x_sync(); ecore_x_sync();
#endif
e_alert_show(); e_alert_show();
} }
@ -93,10 +97,12 @@ EAPI void
e_sigfpe_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__) e_sigfpe_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
{ {
_e_x_composite_shutdown(); _e_x_composite_shutdown();
#ifdef E_COMP_X_H
ecore_x_pointer_ungrab(); ecore_x_pointer_ungrab();
ecore_x_keyboard_ungrab(); ecore_x_keyboard_ungrab();
ecore_x_ungrab(); ecore_x_ungrab();
ecore_x_sync(); ecore_x_sync();
#endif
e_alert_show(); e_alert_show();
} }
@ -104,10 +110,12 @@ EAPI void
e_sigbus_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__) e_sigbus_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
{ {
_e_x_composite_shutdown(); _e_x_composite_shutdown();
#ifdef E_COMP_X_H
ecore_x_pointer_ungrab(); ecore_x_pointer_ungrab();
ecore_x_keyboard_ungrab(); ecore_x_keyboard_ungrab();
ecore_x_ungrab(); ecore_x_ungrab();
ecore_x_sync(); ecore_x_sync();
#endif
e_alert_show(); e_alert_show();
} }
@ -115,10 +123,12 @@ EAPI void
e_sigabrt_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__) e_sigabrt_act(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
{ {
_e_x_composite_shutdown(); _e_x_composite_shutdown();
#ifdef E_COMP_X_H
ecore_x_pointer_ungrab(); ecore_x_pointer_ungrab();
ecore_x_keyboard_ungrab(); ecore_x_keyboard_ungrab();
ecore_x_ungrab(); ecore_x_ungrab();
ecore_x_sync(); ecore_x_sync();
#endif
e_alert_show(); e_alert_show();
} }

View File

@ -1,6 +1,5 @@
#include "e.h" #include "e.h"
#ifdef HAVE_WAYLAND_CLIENTS #ifdef HAVE_WAYLAND_CLIENTS
# include <Ecore_Wayland.h>
# include "e_comp_wl.h" # include "e_comp_wl.h"
#endif #endif
@ -75,6 +74,7 @@ _elm_win_trap_show(void *data, Evas_Object *o)
{ {
Elm_Win_Trap_Ctx *ctx = data; Elm_Win_Trap_Ctx *ctx = data;
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE); EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
#ifndef HAVE_WAYLAND_ONLY
if (!ctx->client) if (!ctx->client)
{ {
Ecore_X_Window xwin = elm_win_xwindow_get(o); Ecore_X_Window xwin = elm_win_xwindow_get(o);
@ -104,6 +104,7 @@ _elm_win_trap_show(void *data, Evas_Object *o)
ctx->client->internal_ecore_evas = ee; ctx->client->internal_ecore_evas = ee;
evas_object_data_set(o, "E_Client", ctx->client); evas_object_data_set(o, "E_Client", ctx->client);
} }
#endif
if (ctx->centered) e_comp_object_util_center(ctx->client->frame); if (ctx->centered) e_comp_object_util_center(ctx->client->frame);
evas_object_show(ctx->client->frame); evas_object_show(ctx->client->frame);
return EINA_TRUE; return EINA_TRUE;
@ -324,7 +325,7 @@ e_win_new(E_Comp *c)
win->max_aspect = 0.0; win->max_aspect = 0.0;
wins = eina_list_append(wins, win); wins = eina_list_append(wins, win);
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (c->comp_type == E_PIXMAP_TYPE_X) if (c->comp_type == E_PIXMAP_TYPE_X)
{ {
win->pointer = e_pointer_window_new(win->evas_win, 1); win->pointer = e_pointer_window_new(win->evas_win, 1);

View File

@ -62,7 +62,9 @@ e_xkb_update(int cur_group)
if (cur_group != -1) if (cur_group != -1)
{ {
_e_xkb_cur_group = cur_group; _e_xkb_cur_group = cur_group;
#ifndef HAVE_WAYLAND_ONLY
ecore_x_xkb_select_group(cur_group); ecore_x_xkb_select_group(cur_group);
#endif
e_deskenv_xmodmap_run(); e_deskenv_xmodmap_run();
_e_xkb_update_event(cur_group); _e_xkb_update_event(cur_group);
return; return;

View File

@ -49,7 +49,7 @@ static Eina_Bool _cb_acpi_event(void *data,
/* local variables */ /* local variables */
static E_Dialog *grab_dlg = NULL; static E_Dialog *grab_dlg = NULL;
static Ecore_X_Window grab_win = 0; static Ecore_Window grab_win = 0;
static Eina_List *grab_hdls = NULL; static Eina_List *grab_hdls = NULL;
E_Config_Dialog * E_Config_Dialog *
@ -129,7 +129,9 @@ _free_data(E_Config_Dialog *cfd __UNUSED__,
if (grab_win) if (grab_win)
{ {
e_grabinput_release(grab_win, grab_win); e_grabinput_release(grab_win, grab_win);
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_free(grab_win); ecore_x_window_free(grab_win);
#endif
} }
grab_win = 0; grab_win = 0;
@ -528,9 +530,11 @@ _cb_add_binding(void *data,
e_win_centered_set(grab_dlg->win, EINA_TRUE); e_win_centered_set(grab_dlg->win, EINA_TRUE);
e_win_borderless_set(grab_dlg->win, EINA_TRUE); e_win_borderless_set(grab_dlg->win, EINA_TRUE);
#ifndef HAVE_WAYLAND_ONLY
grab_win = ecore_x_window_input_new(man->root, 0, 0, 1, 1); grab_win = ecore_x_window_input_new(man->root, 0, 0, 1, 1);
ecore_x_window_show(grab_win); ecore_x_window_show(grab_win);
e_grabinput_get(grab_win, 0, grab_win); e_grabinput_get(grab_win, 0, grab_win);
#endif
grab_hdls = grab_hdls =
eina_list_append(grab_hdls, eina_list_append(grab_hdls,
@ -545,8 +549,10 @@ _cb_add_binding(void *data,
e_acpi_events_freeze(); e_acpi_events_freeze();
e_dialog_show(grab_dlg); e_dialog_show(grab_dlg);
#ifndef HAVE_WAYLAND_ONLY
ecore_x_icccm_transient_for_set(grab_dlg->win->evas_win, ecore_x_icccm_transient_for_set(grab_dlg->win->evas_win,
cfdata->cfd->dia->win->evas_win); cfdata->cfd->dia->win->evas_win);
#endif
} }
static void static void
@ -633,7 +639,9 @@ _cb_grab_key_down(void *data,
/* kill the dialog window */ /* kill the dialog window */
e_grabinput_release(grab_win, grab_win); e_grabinput_release(grab_win, grab_win);
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_free(grab_win); ecore_x_window_free(grab_win);
#endif
grab_win = 0; grab_win = 0;
e_object_del(E_OBJECT(grab_dlg)); e_object_del(E_OBJECT(grab_dlg));
grab_dlg = NULL; grab_dlg = NULL;
@ -663,7 +671,9 @@ _cb_acpi_event(void *data,
/* kill the dialog window */ /* kill the dialog window */
e_grabinput_release(grab_win, grab_win); e_grabinput_release(grab_win, grab_win);
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_free(grab_win); ecore_x_window_free(grab_win);
#endif
grab_win = 0; grab_win = 0;
e_object_del(E_OBJECT(grab_dlg)); e_object_del(E_OBJECT(grab_dlg));
grab_dlg = NULL; grab_dlg = NULL;

View File

@ -150,7 +150,9 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->bg_method = E_DESKLOCK_BACKGROUND_METHOD_CUSTOM; cfdata->bg_method = E_DESKLOCK_BACKGROUND_METHOD_CUSTOM;
cfdata->bg_method_prev = cfdata->bg_method; cfdata->bg_method_prev = cfdata->bg_method;
#ifndef HAVE_WAYLAND_ONLY
cfdata->use_xscreensaver = ecore_x_screensaver_event_available_get(); cfdata->use_xscreensaver = ecore_x_screensaver_event_available_get();
#endif
cfdata->desklock_auth_method = e_config->desklock_auth_method; cfdata->desklock_auth_method = e_config->desklock_auth_method;
if (e_config->desklock_custom_desklock_cmd) if (e_config->desklock_custom_desklock_cmd)

View File

@ -220,12 +220,14 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
{ {
Evas_Object *o, *ob; Evas_Object *o, *ob;
double sc = 1.0; double sc = 1.0;
int dpi, x = 0, y = 0; int dpi = 0, x = 0, y = 0;
_fill_data(cfdata); _fill_data(cfdata);
o = e_widget_table_add(evas, 1); o = e_widget_table_add(evas, 1);
#ifndef HAVE_WAYLAND_ONLY
dpi = ecore_x_dpi_get(); dpi = ecore_x_dpi_get();
#endif
if ((dpi > 0) && (cfdata->base_dpi > 0)) if ((dpi > 0) && (cfdata->base_dpi > 0))
sc = (double)dpi / (double)cfdata->base_dpi; sc = (double)dpi / (double)cfdata->base_dpi;
@ -306,8 +308,10 @@ _adv_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *c
e_widget_on_change_hook_set(ow, _adv_policy_changed, cfdata); e_widget_on_change_hook_set(ow, _adv_policy_changed, cfdata);
e_widget_list_object_append(o, ow, 1, 1, 0.5); e_widget_list_object_append(o, ow, 1, 1, 0.5);
#ifndef HAVE_WAYLAND_ONLY
snprintf(buff, sizeof(buff), snprintf(buff, sizeof(buff),
_("Base DPI (Currently %i DPI)"), ecore_x_dpi_get()); _("Base DPI (Currently %i DPI)"), ecore_x_dpi_get());
#endif
ow = e_widget_label_add(evas, buff); ow = e_widget_label_add(evas, buff);
cfdata->gui.adv.dpi_lbl = ow; cfdata->gui.adv.dpi_lbl = ow;
e_widget_list_object_append(o, ow, 1, 1, 0.5); e_widget_list_object_append(o, ow, 1, 1, 0.5);

View File

@ -882,6 +882,7 @@ _e_fwin_icon_popup(void *data)
e_comp_object_util_del_list_append(fwin->popup, list); e_comp_object_util_del_list_append(fwin->popup, list);
e_comp_object_util_del_list_append(fwin->popup, o); e_comp_object_util_del_list_append(fwin->popup, o);
evas_object_pass_events_set(fwin->popup, 1); evas_object_pass_events_set(fwin->popup, 1);
#ifndef HAVE_WAYLAND_ONLY
if (!fwin->popup_handlers) if (!fwin->popup_handlers)
{ {
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_XDND_ENTER, _e_fwin_icon_popup_handler, fwin); E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_XDND_ENTER, _e_fwin_icon_popup_handler, fwin);
@ -890,6 +891,7 @@ _e_fwin_icon_popup(void *data)
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_fwin_icon_popup_handler, fwin); E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_fwin_icon_popup_handler, fwin);
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_MOUSE_OUT, _e_fwin_icon_popup_handler, fwin); E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_MOUSE_OUT, _e_fwin_icon_popup_handler, fwin);
} }
#endif
evas_object_show(fwin->popup); evas_object_show(fwin->popup);
return EINA_FALSE; return EINA_FALSE;
} }
@ -922,6 +924,7 @@ _e_fwin_icon_mouse_in(void *data, Evas_Object *obj __UNUSED__, void *event_info)
if (!fileman_config->tooltip.enable) return; if (!fileman_config->tooltip.enable) return;
fwin->popup_timer = ecore_timer_add(fileman_config->tooltip.delay, _e_fwin_icon_popup, fwin); fwin->popup_timer = ecore_timer_add(fileman_config->tooltip.delay, _e_fwin_icon_popup, fwin);
fwin->popup_icon = ici; fwin->popup_icon = ici;
#ifndef HAVE_WAYLAND_ONLY
if (!fwin->popup_handlers) if (!fwin->popup_handlers)
{ {
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_XDND_ENTER, _e_fwin_icon_popup_handler, fwin); E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_XDND_ENTER, _e_fwin_icon_popup_handler, fwin);
@ -930,6 +933,7 @@ _e_fwin_icon_mouse_in(void *data, Evas_Object *obj __UNUSED__, void *event_info)
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_fwin_icon_popup_handler, fwin); E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_fwin_icon_popup_handler, fwin);
E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_MOUSE_OUT, _e_fwin_icon_popup_handler, fwin); E_LIST_HANDLER_APPEND(fwin->popup_handlers, ECORE_X_EVENT_MOUSE_OUT, _e_fwin_icon_popup_handler, fwin);
} }
#endif
} }
static void static void
@ -2109,7 +2113,9 @@ _e_fwin_path(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
xwin = e_client_util_win_get(page->fwin->win->client); xwin = e_client_util_win_get(page->fwin->win->client);
else else
xwin = page->fwin->zone->comp->ee_win; xwin = page->fwin->zone->comp->ee_win;
#ifndef HAVE_WAYLAND_ONLY
ecore_x_selection_clipboard_set(xwin, path, strlen(path) + 1); ecore_x_selection_clipboard_set(xwin, path, strlen(path) + 1);
#endif
} }
static void static void

View File

@ -215,6 +215,7 @@ _box_button_cb_dnd_selection_notify(void *data, const char *type, void *event)
if (!args) goto out; if (!args) goto out;
args = e_util_string_append_quoted(args, &size, &length, inst->dnd_path); args = e_util_string_append_quoted(args, &size, &length, inst->dnd_path);
if (!args) goto out; if (!args) goto out;
#ifndef HAVE_WAYLAND_ONLY
if (link_drop || (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_LINK)) if (link_drop || (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_LINK))
e_fm2_client_file_symlink(inst->o_fm, args); e_fm2_client_file_symlink(inst->o_fm, args);
else if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_COPY) else if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_COPY)
@ -223,6 +224,7 @@ _box_button_cb_dnd_selection_notify(void *data, const char *type, void *event)
e_fm2_client_file_move(inst->o_fm, args); e_fm2_client_file_move(inst->o_fm, args);
else if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_ASK) else if (e_drop_handler_action_get() == ECORE_X_ATOM_XDND_ACTION_ASK)
e_fm2_drop_menu(inst->o_fm, args); e_fm2_drop_menu(inst->o_fm, args);
#endif
free(args); free(args);
out: out:
E_FREE(inst->dnd_path); E_FREE(inst->dnd_path);

View File

@ -177,7 +177,7 @@ static void _pager_popup_cb_action_switch(E_Object *obj __UNUSED__,
/* variables for pager popup on key actions */ /* variables for pager popup on key actions */
static E_Action *act_popup_show = NULL; static E_Action *act_popup_show = NULL;
static E_Action *act_popup_switch = NULL; static E_Action *act_popup_switch = NULL;
static Ecore_X_Window input_window = 0; static Ecore_Window input_window = 0;
static Eina_List *handlers = NULL; static Eina_List *handlers = NULL;
static Pager_Popup *act_popup = NULL; /* active popup */ static Pager_Popup *act_popup = NULL; /* active popup */
static int hold_count = 0; static int hold_count = 0;
@ -1960,7 +1960,7 @@ _pager_window_cb_drag_finished(E_Drag *drag, int dropped)
E_Comp *comp; E_Comp *comp;
E_Zone *zone; E_Zone *zone;
E_Desk *desk; E_Desk *desk;
int x, y, dx, dy; int x = 0, y = 0, dx, dy;
pw = drag->data; pw = drag->data;
if (!pw) return; if (!pw) return;
@ -1981,7 +1981,9 @@ _pager_window_cb_drag_finished(E_Drag *drag, int dropped)
e_client_desk_set(pw->client, desk); e_client_desk_set(pw->client, desk);
} }
#ifndef HAVE_WAYLAND_ONLY
ecore_x_pointer_last_xy_get(&x, &y); ecore_x_pointer_last_xy_get(&x, &y);
#endif
dx = (pw->client->w / 2); dx = (pw->client->w / 2);
dy = (pw->client->h / 2); dy = (pw->client->h / 2);
@ -2411,12 +2413,14 @@ _pager_popup_cb_timeout(void *data)
pp->timer = NULL; pp->timer = NULL;
_pager_popup_free(pp); _pager_popup_free(pp);
#ifndef HAVE_WAYLAND_ONLY
if (input_window) if (input_window)
{ {
ecore_x_window_free(input_window); ecore_x_window_free(input_window);
e_grabinput_release(input_window, input_window); e_grabinput_release(input_window, input_window);
input_window = 0; input_window = 0;
} }
#endif
return ECORE_CALLBACK_CANCEL; return ECORE_CALLBACK_CANCEL;
} }
@ -2442,6 +2446,7 @@ _pager_popup_show(void)
pp = _pager_popup_find(zone); pp = _pager_popup_find(zone);
if (pp) _pager_popup_free(pp); if (pp) _pager_popup_free(pp);
#ifndef HAVE_WAYLAND_ONLY
input_window = ecore_x_window_input_new(zone->comp->win, 0, 0, 1, 1); input_window = ecore_x_window_input_new(zone->comp->win, 0, 0, 1, 1);
ecore_x_window_show(input_window); ecore_x_window_show(input_window);
if (!e_grabinput_get(input_window, 0, input_window)) if (!e_grabinput_get(input_window, 0, input_window))
@ -2450,6 +2455,7 @@ _pager_popup_show(void)
input_window = 0; input_window = 0;
return 0; return 0;
} }
#endif
handlers = eina_list_append handlers = eina_list_append
(handlers, ecore_event_handler_add (handlers, ecore_event_handler_add

View File

@ -156,7 +156,7 @@ static void _pager_popup_cb_action_switch(E_Object *obj __UNUSED__,
/* variables for pager popup on key actions */ /* variables for pager popup on key actions */
static E_Action *act_popup_show = NULL; static E_Action *act_popup_show = NULL;
static E_Action *act_popup_switch = NULL; static E_Action *act_popup_switch = NULL;
static Ecore_X_Window input_window = 0; static Ecore_Window input_window = 0;
static Eina_List *handlers = NULL; static Eina_List *handlers = NULL;
static Pager_Popup *act_popup = NULL; /* active popup */ static Pager_Popup *act_popup = NULL; /* active popup */
static int hold_count = 0; static int hold_count = 0;
@ -1629,12 +1629,14 @@ _pager_popup_cb_timeout(void *data)
pp->timer = NULL; pp->timer = NULL;
_pager_popup_free(pp); _pager_popup_free(pp);
#ifndef HAVE_WAYLAND_ONLY
if (input_window) if (input_window)
{ {
ecore_x_window_free(input_window); ecore_x_window_free(input_window);
e_grabinput_release(input_window, input_window); e_grabinput_release(input_window, input_window);
input_window = 0; input_window = 0;
} }
#endif
return ECORE_CALLBACK_CANCEL; return ECORE_CALLBACK_CANCEL;
} }
@ -1660,6 +1662,7 @@ _pager_popup_show(void)
pp = _pager_popup_find(zone); pp = _pager_popup_find(zone);
if (pp) _pager_popup_free(pp); if (pp) _pager_popup_free(pp);
#ifndef HAVE_WAYLAND_ONLY
input_window = ecore_x_window_input_new(zone->comp->win, 0, 0, 1, 1); input_window = ecore_x_window_input_new(zone->comp->win, 0, 0, 1, 1);
ecore_x_window_show(input_window); ecore_x_window_show(input_window);
if (!e_grabinput_get(input_window, 0, input_window)) if (!e_grabinput_get(input_window, 0, input_window))
@ -1668,6 +1671,7 @@ _pager_popup_show(void)
input_window = 0; input_window = 0;
return 0; return 0;
} }
#endif
handlers = eina_list_append handlers = eina_list_append
(handlers, ecore_event_handler_add (handlers, ecore_event_handler_add

View File

@ -168,7 +168,7 @@ is_tilable(const E_Client *ec)
if (ec->icccm.min_h == ec->icccm.max_h && ec->icccm.max_h > 0) if (ec->icccm.min_h == ec->icccm.max_h && ec->icccm.max_h > 0)
return false; return false;
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (ec->icccm.gravity == ECORE_X_GRAVITY_STATIC) if (ec->icccm.gravity == ECORE_X_GRAVITY_STATIC)
return false; return false;
#endif #endif

View File

@ -51,7 +51,7 @@ static int _hold_count = 0;
static int _hold_mod = 0; static int _hold_mod = 0;
static E_Winlist_Activate_Type _activate_type = 0; static E_Winlist_Activate_Type _activate_type = 0;
static Eina_List *_handlers = NULL; static Eina_List *_handlers = NULL;
static Ecore_X_Window _input_window = 0; static Ecore_Window _input_window = 0;
static int _scroll_to = 0; static int _scroll_to = 0;
static double _scroll_align_to = 0.0; static double _scroll_align_to = 0.0;
static double _scroll_align = 0.0; static double _scroll_align = 0.0;
@ -103,6 +103,7 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
if (_winlist) return 0; if (_winlist) return 0;
#ifndef HAVE_WAYLAND_ONLY
_input_window = ecore_x_window_input_new(zone->comp->man->root, 0, 0, 1, 1); _input_window = ecore_x_window_input_new(zone->comp->man->root, 0, 0, 1, 1);
ecore_x_window_show(_input_window); ecore_x_window_show(_input_window);
if (!e_grabinput_get(_input_window, 0, _input_window)) if (!e_grabinput_get(_input_window, 0, _input_window))
@ -111,6 +112,7 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
_input_window = 0; _input_window = 0;
return 0; return 0;
} }
#endif
w = (double)zone->w * e_config->winlist_pos_size_w; w = (double)zone->w * e_config->winlist_pos_size_w;
if (w > e_config->winlist_pos_max_w) w = e_config->winlist_pos_max_w; if (w > e_config->winlist_pos_max_w) w = e_config->winlist_pos_max_w;
@ -131,9 +133,11 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
e_client_resize_cancel(); e_client_resize_cancel();
e_client_focus_track_freeze(); e_client_focus_track_freeze();
#ifndef HAVE_WAYLAND_ONLY
evas_event_feed_mouse_in(zone->comp->evas, ecore_x_current_time_get(), NULL); evas_event_feed_mouse_in(zone->comp->evas, ecore_x_current_time_get(), NULL);
evas_event_feed_mouse_move(zone->comp->evas, -1000000, -1000000, evas_event_feed_mouse_move(zone->comp->evas, -1000000, -1000000,
ecore_x_current_time_get(), NULL); ecore_x_current_time_get(), NULL);
#endif
evas_event_freeze(zone->comp->evas); evas_event_freeze(zone->comp->evas);
o = edje_object_add(zone->comp->evas); o = edje_object_add(zone->comp->evas);
@ -258,7 +262,9 @@ e_winlist_hide(void)
E_FREE_FUNC(_animator, ecore_animator_del); E_FREE_FUNC(_animator, ecore_animator_del);
e_grabinput_release(_input_window, _input_window); e_grabinput_release(_input_window, _input_window);
#ifndef HAVE_WAYLAND_ONLY
ecore_x_window_free(_input_window); ecore_x_window_free(_input_window);
#endif
_input_window = 0; _input_window = 0;
if (ec) if (ec)
{ {

View File

@ -49,7 +49,7 @@ wizard_page_show(E_Wizard_Page *pg)
Evas_Object *o, *of, *ob; Evas_Object *o, *of, *ob;
Ecore_Evas *ee; Ecore_Evas *ee;
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
Ecore_X_Window_Attributes att; Ecore_X_Window_Attributes att;
if (!ecore_x_composite_query()) return 0; if (!ecore_x_composite_query()) return 0;

View File

@ -1336,7 +1336,7 @@ _e_wl_shell_shell_surface_cb_key_up(void *data, Evas *e EINA_UNUSED, Evas_Object
/* is the focused surface actually This surface ? */ /* is the focused surface actually This surface ? */
if (kbd->focus != ews->wl.surface) return; if (kbd->focus != ews->wl.surface) return;
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (_e_wl_comp->kbd_handler) if (_e_wl_comp->kbd_handler)
/* get the keycode for this key from X, since we're definitely in X here */ /* get the keycode for this key from X, since we're definitely in X here */
key = ecore_x_keysym_keycode_get(ev->key) - 8; key = ecore_x_keysym_keycode_get(ev->key) - 8;
@ -1402,7 +1402,7 @@ _e_wl_shell_shell_surface_cb_key_down(void *data, Evas *e EINA_UNUSED, Evas_Obje
/* if the compositor has a ping callback, call it on this surface */ /* if the compositor has a ping callback, call it on this surface */
if (_e_wl_comp->ping_cb) _e_wl_comp->ping_cb(ews, serial); if (_e_wl_comp->ping_cb) _e_wl_comp->ping_cb(ews, serial);
#ifndef WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (_e_wl_comp->kbd_handler) if (_e_wl_comp->kbd_handler)
/* get the keycode for this key from X, since we're definitely in X here */ /* get the keycode for this key from X, since we're definitely in X here */
key = ecore_x_keysym_keycode_get(ev->key) - 8; key = ecore_x_keysym_keycode_get(ev->key) - 8;