From def1b28174866b6085b1a5310e3f6d3a4e2e9721 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 28 Jul 2017 13:49:30 -0400 Subject: [PATCH] save xwindow of x11 selection owner, not client gtk uses non-application xwindows for managing selections, so this would always fail when bridging selections from gtk apps --- src/bin/e_comp_wl.h | 2 +- src/bin/e_comp_wl_data.c | 2 +- src/modules/xwayland/dnd.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 3f5f200d4..e91a8a40e 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -236,7 +236,7 @@ struct _E_Comp_Wl_Data { void *source; struct wl_listener listener; - E_Client *xwl_owner; + Ecore_Window xwl_owner; } clipboard; struct diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c index 57bc6f675..87ffdf903 100644 --- a/src/bin/e_comp_wl_data.c +++ b/src/bin/e_comp_wl_data.c @@ -508,7 +508,7 @@ _e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Sour } e_comp_wl->selection.data_source = sel_source = source; - e_comp_wl->clipboard.xwl_owner = NULL; + e_comp_wl->clipboard.xwl_owner = 0; source->serial = e_comp_wl->selection.serial = serial; if (e_comp_wl->kbd.enabled) diff --git a/src/modules/xwayland/dnd.c b/src/modules/xwayland/dnd.c index 97e29b115..9ad5afbf7 100644 --- a/src/modules/xwayland/dnd.c +++ b/src/modules/xwayland/dnd.c @@ -155,7 +155,7 @@ _xwl_fixes_selection_notify(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_X_Even { if (ev->owner == e_comp->cm_selection) { - e_comp_wl->clipboard.xwl_owner = NULL; + e_comp_wl->clipboard.xwl_owner = 0; return ECORE_CALLBACK_RENEW; } if (ev->atom == ECORE_X_ATOM_SELECTION_XDND) @@ -237,12 +237,12 @@ _xwl_fixes_selection_notify(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_X_Even if (e_comp_wl->clipboard.source) e_comp_wl_clipboard_source_unref(e_comp_wl->clipboard.source); e_comp_wl->clipboard.source = NULL; - e_comp_wl->clipboard.xwl_owner = ev->owner ? e_pixmap_find_client(E_PIXMAP_TYPE_X, ev->owner) : NULL; + e_comp_wl->clipboard.xwl_owner = ev->owner; xconvertselection(ecore_x_display_get(), ECORE_X_ATOM_SELECTION_CLIPBOARD, ECORE_X_ATOM_SELECTION_TARGETS, xwl_dnd_atom, e_comp->cm_selection, 0); } else - e_comp_wl->clipboard.xwl_owner = NULL; + e_comp_wl->clipboard.xwl_owner = 0; } return ECORE_CALLBACK_RENEW; }