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
This commit is contained in:
Mike Blumenkrantz 2017-07-28 13:49:30 -04:00
parent ff915f92f2
commit 499cd346a8
3 changed files with 5 additions and 5 deletions

View File

@ -220,7 +220,7 @@ struct _E_Comp_Wl_Data
{ {
void *source; void *source;
struct wl_listener listener; struct wl_listener listener;
E_Client *xwl_owner; Ecore_Window xwl_owner;
} clipboard; } clipboard;
struct struct

View File

@ -501,7 +501,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->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; source->serial = e_comp_wl->selection.serial = serial;
if (e_comp_wl->kbd.enabled) if (e_comp_wl->kbd.enabled)

View File

@ -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) 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; return ECORE_CALLBACK_RENEW;
} }
if (ev->atom == ECORE_X_ATOM_SELECTION_XDND) 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) if (e_comp_wl->clipboard.source)
e_comp_wl_clipboard_source_unref(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.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, xconvertselection(ecore_x_display_get(), ECORE_X_ATOM_SELECTION_CLIPBOARD,
ECORE_X_ATOM_SELECTION_TARGETS, xwl_dnd_atom, e_comp->cm_selection, 0); ECORE_X_ATOM_SELECTION_TARGETS, xwl_dnd_atom, e_comp->cm_selection, 0);
} }
else else
e_comp_wl->clipboard.xwl_owner = NULL; e_comp_wl->clipboard.xwl_owner = 0;
} }
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }