forked from enlightenment/enlightenment
enabling drm output module should NOT require X-less build.
these defines all need to be changed from HAVE_WAYLAND_ONLY to something like WITH_X or we're going to have lots of problems with xwayland later on
This commit is contained in:
parent
af3f435d98
commit
c04d754ac5
|
@ -865,7 +865,7 @@ AM_CONDITIONAL([HAVE_WL_FB], [test "x${WL_FB}" = "xtrue"])
|
|||
|
||||
define([CHECK_MODULE_WL_DRM],
|
||||
[
|
||||
if test "x${have_wayland}" = "xyes" && test "x${e_cv_want_wayland_only}" = "xyes"; then
|
||||
if test "x${have_wayland}" = "xyes" ; then
|
||||
AC_E_CHECK_PKG(WL_DRM, [ ecore-drm >= $efl_version ecore >= $efl_version eina >= $efl_version ], [WL_DRM=true], [WL_DRM=false])
|
||||
else
|
||||
WL_DRM=false
|
||||
|
|
|
@ -48,7 +48,7 @@ e_backlight_init(void)
|
|||
#endif
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->man->root)
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
xbl_avail = ecore_x_randr_output_backlight_available();
|
||||
#endif
|
||||
e_backlight_update();
|
||||
|
|
|
@ -1115,7 +1115,6 @@ e_comp_init(void)
|
|||
actions = eina_list_append(actions, act);
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND_ONLY
|
||||
{
|
||||
const char *eng;
|
||||
|
||||
|
@ -1126,18 +1125,18 @@ e_comp_init(void)
|
|||
|
||||
snprintf(buf, sizeof(buf), "wl_%s", eng);
|
||||
if (e_module_enable(e_module_new(buf)))
|
||||
return EINA_TRUE;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (!e_comp_x_init()) return EINA_FALSE;
|
||||
e_comp_x_init();
|
||||
#endif
|
||||
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
|
||||
if (!e_comp_wl_init()) return EINA_FALSE;
|
||||
e_comp_wl_init();
|
||||
#endif
|
||||
|
||||
if (!compositors) return EINA_FALSE;
|
||||
out:
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON, _e_comp_screensaver_on, NULL);
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_OFF, _e_comp_screensaver_off, NULL);
|
||||
|
||||
|
|
|
@ -5060,7 +5060,6 @@ e_comp_x_init(void)
|
|||
|
||||
if (!ecore_x_init(NULL))
|
||||
{
|
||||
_e_comp_x_print_win(0);
|
||||
e_error_message_show(_("Enlightenment cannot initialize Ecore_X!\n"));
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
@ -5069,6 +5068,8 @@ e_comp_x_init(void)
|
|||
|
||||
if (!ecore_x_composite_query())
|
||||
{
|
||||
_e_comp_x_print_win(0);
|
||||
ecore_x_shutdown();
|
||||
e_error_message_show
|
||||
(_("Your display server does not support XComposite, "
|
||||
"or Ecore-X was built without XComposite support. "
|
||||
|
|
|
@ -111,6 +111,7 @@ e_dnd_init(void)
|
|||
_type_text_x_moz_url = eina_stringshare_add("text/x-moz-url");
|
||||
_type_enlightenment_x_file = eina_stringshare_add("enlightenment/x-file");
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
_text_atom = ecore_x_atom_get("text/plain");
|
||||
#endif
|
||||
|
||||
|
@ -121,6 +122,7 @@ e_dnd_init(void)
|
|||
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);
|
||||
if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X) return 1;
|
||||
#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_LEAVE, _e_dnd_cb_event_dnd_leave, NULL);
|
||||
|
@ -130,12 +132,10 @@ 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_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);
|
||||
#endif
|
||||
|
||||
EINA_LIST_FOREACH(e_comp_list(), l, c)
|
||||
e_drop_xdnd_register_set(c->ee_win, 1);
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
_action = ECORE_X_ATOM_XDND_ACTION_PRIVATE;
|
||||
#endif
|
||||
return 1;
|
||||
|
@ -343,6 +343,7 @@ e_drag_xdnd_start(E_Drag *drag, int x, int y)
|
|||
|
||||
if (_drag_win) return 0;
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(drag)->comp_type != E_PIXMAP_TYPE_X) return 0;
|
||||
_drag_win = ecore_x_window_input_new(drag->comp->win,
|
||||
drag->comp->man->x, drag->comp->man->y,
|
||||
drag->comp->man->w, drag->comp->man->h);
|
||||
|
@ -414,6 +415,7 @@ e_drop_xds_update(Eina_Bool enable, const char *value)
|
|||
int size;
|
||||
size_t len;
|
||||
|
||||
if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X) return;
|
||||
enable = !!enable;
|
||||
|
||||
xwin = ecore_x_selection_owner_get(ECORE_X_ATOM_SELECTION_XDND);
|
||||
|
@ -522,6 +524,7 @@ e_drop_handler_del(E_Drop_Handler *handler)
|
|||
EAPI int
|
||||
e_drop_xdnd_register_set(Ecore_Window win, int reg)
|
||||
{
|
||||
if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X) return 0;
|
||||
if (reg)
|
||||
{
|
||||
if (!eina_hash_find(_drop_win_hash, &win))
|
||||
|
|
|
@ -29,6 +29,7 @@ e_dpms_update(void)
|
|||
{
|
||||
_e_dpms_enabled = enabled;
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
ecore_x_dpms_enabled_set(enabled);
|
||||
#endif
|
||||
}
|
||||
|
@ -57,7 +58,10 @@ e_dpms_update(void)
|
|||
changed = EINA_TRUE;
|
||||
}
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
{
|
||||
if (changed) ecore_x_dpms_timeouts_set(standby, suspend, off);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -70,6 +74,7 @@ e_dpms_force_update(void)
|
|||
enabled = ((e_config->screensaver_enable) &&
|
||||
(!e_config->mode.presentation));
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
ecore_x_dpms_enabled_set(enabled);
|
||||
#endif
|
||||
if (!enabled) return;
|
||||
|
@ -82,6 +87,7 @@ e_dpms_force_update(void)
|
|||
off += 7;
|
||||
}
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X) return;
|
||||
ecore_x_dpms_timeouts_set(standby + 10, suspend + 10, off + 10);
|
||||
ecore_x_dpms_timeouts_set(standby, suspend, off);
|
||||
#endif
|
||||
|
@ -143,9 +149,12 @@ e_dpms_init(void)
|
|||
(E_EVENT_DESK_SHOW, _e_dpms_handler_desk_show_cb, NULL);
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
{
|
||||
_e_dpms_enabled = ecore_x_dpms_enabled_get();
|
||||
ecore_x_dpms_timeouts_get
|
||||
(&_e_dpms_timeout_standby, &_e_dpms_timeout_suspend, &_e_dpms_timeout_off);
|
||||
}
|
||||
#endif
|
||||
|
||||
e_dpms_force_update();
|
||||
|
|
|
@ -611,6 +611,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
TS("Screens Init Done");
|
||||
_e_main_shutdown_push(_e_main_screens_shutdown);
|
||||
e_screensaver_force_update();
|
||||
|
||||
TS("E_Pointer Init");
|
||||
if (!e_pointer_init())
|
||||
|
@ -1708,6 +1709,7 @@ _e_main_cb_x_flusher(void *data __UNUSED__)
|
|||
{
|
||||
eet_clearcache();
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
ecore_x_flush();
|
||||
#endif
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
|
|
|
@ -495,7 +495,7 @@ e_module_enable(E_Module *m)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (!_e_modules_initting)
|
||||
if (_e_modules_hash && (!_e_modules_initting))
|
||||
_e_module_whitelist_check();
|
||||
return 1;
|
||||
}
|
||||
|
@ -974,16 +974,19 @@ _e_module_whitelist_check(void)
|
|||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
{
|
||||
Ecore_X_Atom _x_tainted;
|
||||
char *state;
|
||||
unsigned int _e_tainted;
|
||||
const char *state;
|
||||
|
||||
state = badl ? "YES" : "NO";
|
||||
_e_tainted = badl ? 1 : 0;
|
||||
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
{
|
||||
Ecore_X_Atom _x_tainted;
|
||||
unsigned int _e_tainted = badl ? 1 : 0;
|
||||
|
||||
_x_tainted = ecore_x_atom_get("_E_TAINTED");
|
||||
ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
|
||||
_x_tainted, &_e_tainted, 1);
|
||||
}
|
||||
|
||||
e_env_set("E19_TAINTED", state);
|
||||
}
|
||||
|
|
|
@ -7,12 +7,15 @@ e_mouse_update(void)
|
|||
int n;
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
{
|
||||
if (!ecore_x_pointer_control_set(e_config->mouse_accel_numerator,
|
||||
e_config->mouse_accel_denominator,
|
||||
e_config->mouse_accel_threshold))
|
||||
return 0;
|
||||
|
||||
if (!ecore_x_pointer_mapping_get(map, 256)) return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (n = 0; n < 256; n++)
|
||||
|
@ -38,6 +41,7 @@ e_mouse_update(void)
|
|||
}
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
if (!ecore_x_pointer_mapping_set(map, n)) return 0;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -24,9 +24,12 @@ e_scale_update(void)
|
|||
if (e_config->scale.use_dpi)
|
||||
{
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
{
|
||||
dpi = ecore_x_dpi_get();
|
||||
#endif
|
||||
e_scale = (double)dpi / (double)e_config->scale.base_dpi;
|
||||
}
|
||||
#endif
|
||||
if (e_scale > e_config->scale.max) e_scale = e_config->scale.max;
|
||||
else if (e_scale < e_config->scale.min)
|
||||
e_scale = e_config->scale.min;
|
||||
|
|
|
@ -82,10 +82,13 @@ e_screensaver_update(void)
|
|||
changed = EINA_TRUE;
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND_ONLY
|
||||
#else
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
{
|
||||
if (changed)
|
||||
ecore_x_screensaver_set(timeout, interval, blanking, expose);
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -93,19 +96,21 @@ EAPI void
|
|||
e_screensaver_force_update(void)
|
||||
{
|
||||
int timeout = e_screensaver_timeout_get(EINA_TRUE);
|
||||
#ifdef HAVE_WAYLAND_ONLY
|
||||
#else
|
||||
if (!getenv("DISPLAY")) return;
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(NULL)->comp_type == E_PIXMAP_TYPE_X)
|
||||
{
|
||||
ecore_x_screensaver_set(timeout + 10,
|
||||
0,
|
||||
// e_config->screensaver_interval,
|
||||
// e_config->screensaver_interval,
|
||||
!e_config->screensaver_blanking,
|
||||
!e_config->screensaver_expose);
|
||||
ecore_x_screensaver_set(timeout,
|
||||
0,
|
||||
// e_config->screensaver_interval,
|
||||
// e_config->screensaver_interval,
|
||||
e_config->screensaver_blanking,
|
||||
e_config->screensaver_expose);
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -336,8 +341,6 @@ e_screensaver_init(void)
|
|||
_e_screensaver_handler_powersave = ecore_event_handler_add
|
||||
(E_EVENT_POWERSAVE_UPDATE, _e_screensaver_handler_powersave_cb, NULL);
|
||||
|
||||
e_screensaver_force_update();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ e_xkb_update(int cur_group)
|
|||
|
||||
if (e_config->xkb.dont_touch_my_damn_keyboard) return;
|
||||
if ((!e_config->xkb.used_layouts) && (!e_config->xkb.used_options) && (!e_config->xkb.default_model)) return;
|
||||
if (!getenv("DISPLAY")) return;
|
||||
if (cur_group != -1)
|
||||
{
|
||||
_e_xkb_cur_group = cur_group;
|
||||
|
|
|
@ -30,7 +30,6 @@ src_modules_everything_module_la_SOURCES = $(EVRYHEADERS) \
|
|||
src/modules/everything/evry_view.c \
|
||||
src/modules/everything/evry_view_tabs.c \
|
||||
src/modules/everything/evry_view_help.c \
|
||||
src/modules/everything/evry_plug_clipboard.c \
|
||||
src/modules/everything/evry_plug_text.c \
|
||||
src/modules/everything/evry_plug_collection.c \
|
||||
src/modules/everything/evry_gadget.c \
|
||||
|
@ -42,6 +41,10 @@ src_modules_everything_module_la_SOURCES = $(EVRYHEADERS) \
|
|||
src/modules/everything/evry_plug_settings.c \
|
||||
src/modules/everything/evry_plug_calc.c
|
||||
|
||||
if ! HAVE_WAYLAND_ONLY
|
||||
src_modules_everything_module_la_SOURCES += src/modules/everything/evry_plug_clipboard.c
|
||||
endif
|
||||
|
||||
everything_headersdir = $(pkgincludedir)
|
||||
dist_everything_headers_DATA = $(EVRYHEADERS)
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ static void _evry_view_hide(Evry_Window *win, Evry_View *v, int slide)
|
|||
static void _evry_item_desel(Evry_State *s);
|
||||
static void _evry_item_sel(Evry_State *s, Evry_Item *it);
|
||||
|
||||
static Eina_Bool _evry_cb_show(Evry_Window *win, int type __UNUSED__, Ecore_X_Event_Window_Show *ev);
|
||||
static void _evry_cb_show(Evry_Window *win, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
||||
static Eina_Bool _evry_cb_key_down(void *data, int type, void *event);
|
||||
static Eina_Bool _evry_cb_selection_notify(void *data, int type, void *event);
|
||||
static Eina_Bool _evry_cb_mouse(void *data, int type, void *event);
|
||||
|
@ -178,10 +178,11 @@ evry_show(E_Zone *zone, E_Zone_Edge edge, const char *params, Eina_Bool popup)
|
|||
|
||||
if (popup)
|
||||
{
|
||||
//e_win_layer_set(win->ewin, E_WIN_LAYER_ABOVE);
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(win->ewin)->comp_type == E_PIXMAP_TYPE_X)
|
||||
ecore_x_netwm_window_type_set(win->ewin->evas_win,
|
||||
ECORE_X_WINDOW_TYPE_UTILITY);
|
||||
|
||||
#endif
|
||||
ecore_evas_name_class_set(win->ewin->ecore_evas, "E", "everything");
|
||||
|
||||
e_win_show(win->ewin);
|
||||
|
@ -204,9 +205,11 @@ evry_show(E_Zone *zone, E_Zone_Edge edge, const char *params, Eina_Bool popup)
|
|||
_evry_selector_new(win, EVRY_PLUGIN_OBJECT);
|
||||
|
||||
E_LIST_HANDLER_APPEND(win->handlers, ECORE_EVENT_KEY_DOWN, _evry_cb_key_down, win);
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(win->ewin)->comp_type == E_PIXMAP_TYPE_X)
|
||||
E_LIST_HANDLER_APPEND(win->handlers, ECORE_X_EVENT_SELECTION_NOTIFY, _evry_cb_selection_notify, win);
|
||||
E_LIST_HANDLER_APPEND(win->handlers, ECORE_X_EVENT_WINDOW_SHOW, _evry_cb_show, win);
|
||||
#endif
|
||||
evas_object_event_callback_add(win->ewin->client->frame, EVAS_CALLBACK_SHOW, (Evas_Object_Event_Cb)_evry_cb_show, win);
|
||||
|
||||
E_LIST_HANDLER_APPEND(win->handlers, EVRY_EVENT_ITEM_CHANGED, _evry_cb_item_changed, win);
|
||||
|
||||
|
@ -860,9 +863,8 @@ _evry_window_new(E_Zone *zone, E_Zone_Edge edge)
|
|||
evas_object_resize(o, mw, mh);
|
||||
evas_object_show(o);
|
||||
|
||||
evas_event_feed_mouse_in(win->evas, ecore_x_current_time_get(), NULL);
|
||||
evas_event_feed_mouse_move(win->evas, -1000000, -1000000,
|
||||
ecore_x_current_time_get(), NULL);
|
||||
evas_event_feed_mouse_in(win->evas, 0, NULL);
|
||||
evas_event_feed_mouse_move(win->evas, -1000000, -1000000, 0, NULL);
|
||||
|
||||
e_win_delete_callback_set(win->ewin, _evry_cb_win_delete);
|
||||
e_win_resize_callback_set(win->ewin, _evry_cb_win_resize);
|
||||
|
@ -1921,8 +1923,11 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event)
|
|||
|
||||
e_grabinput_release(ewin->evas_win, ewin->evas_win);
|
||||
evas_object_layer_set(ewin->client->frame, E_LAYER_CLIENT_NORMAL);
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(ewin)->comp_type == E_PIXMAP_TYPE_X)
|
||||
ecore_x_netwm_window_type_set(ewin->evas_win,
|
||||
ECORE_X_WINDOW_TYPE_DIALOG);
|
||||
#endif
|
||||
EC_CHANGED(ewin->client);
|
||||
ewin->client->netwm.fetch.type = 1;
|
||||
ewin->client->netwm.state.skip_taskbar = 0;
|
||||
|
@ -2109,10 +2114,15 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event)
|
|||
_evry_plugin_action(sel, 0);
|
||||
else if (!strcmp(ev->key, "v"))
|
||||
{
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (e_comp_get(win->ewin)->comp_type == E_PIXMAP_TYPE_X)
|
||||
{
|
||||
win->request_selection = EINA_TRUE;
|
||||
ecore_x_selection_primary_request
|
||||
(win->ewin->evas_win, ECORE_X_SELECTION_TARGET_UTF8_STRING);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
_evry_view_key_press(s, ev);
|
||||
|
@ -3017,15 +3027,14 @@ _evry_plugin_list_insert(Evry_State *s, Evry_Plugin *p)
|
|||
s->cur_plugins = eina_list_append(s->cur_plugins, p);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_evry_cb_show(Evry_Window *win, int type __UNUSED__, Ecore_X_Event_Window_Show *ev)
|
||||
static void
|
||||
_evry_cb_show(Evry_Window *win, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
if (win->ewin->evas_win != ev->event_win) return ECORE_CALLBACK_RENEW;
|
||||
if (win->grab)
|
||||
e_grabinput_get(win->ewin->evas_win, 0, win->ewin->evas_win);
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
static Eina_Bool
|
||||
_evry_cb_selection_notify(void *data, int type __UNUSED__, void *event)
|
||||
{
|
||||
|
@ -3055,6 +3064,7 @@ _evry_cb_selection_notify(void *data, int type __UNUSED__, void *event)
|
|||
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
evry_item_app_free(Evry_Item_App *app)
|
||||
|
|
|
@ -8,6 +8,8 @@ _action(Evry_Action *action)
|
|||
{
|
||||
const Evry_Item *it = action->it1.item;
|
||||
|
||||
if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X) return 0;
|
||||
|
||||
ecore_x_selection_primary_set(clipboard_win, it->label, strlen(it->label));
|
||||
ecore_x_selection_clipboard_set(clipboard_win, it->label, strlen(it->label));
|
||||
|
||||
|
@ -23,10 +25,14 @@ _check_item(Evry_Action *action __UNUSED__, const Evry_Item *it)
|
|||
Eina_Bool
|
||||
evry_plug_clipboard_init(void)
|
||||
{
|
||||
Ecore_X_Window win;
|
||||
|
||||
if (!evry_api_version_check(EVRY_API_VERSION))
|
||||
return EINA_FALSE;
|
||||
|
||||
Ecore_X_Window win = ecore_x_window_input_new(0, 0, 0, 1, 1);
|
||||
if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X)
|
||||
return EINA_FALSE;
|
||||
win = ecore_x_window_input_new(0, 0, 0, 1, 1);
|
||||
if (!win) return EINA_FALSE;
|
||||
ecore_x_icccm_name_class_set(win, "evry", "clipboard");
|
||||
e_comp_ignore_win_add(E_PIXMAP_TYPE_X, win);
|
||||
|
@ -47,6 +53,7 @@ evry_plug_clipboard_init(void)
|
|||
void
|
||||
evry_plug_clipboard_shutdown(void)
|
||||
{
|
||||
if (e_comp_get(NULL)->comp_type != E_PIXMAP_TYPE_X) return;
|
||||
ecore_x_window_free(clipboard_win);
|
||||
evry_action_free(act);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue