forked from enlightenment/enlightenment
track xwl clipboard owner
This commit is contained in:
parent
2e000a45dc
commit
bf4c5452f3
|
@ -200,6 +200,7 @@ struct _E_Comp_Wl_Data
|
||||||
{
|
{
|
||||||
void *source;
|
void *source;
|
||||||
struct wl_listener listener;
|
struct wl_listener listener;
|
||||||
|
E_Client *xwl_owner;
|
||||||
} clipboard;
|
} clipboard;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
|
|
|
@ -236,6 +236,7 @@ _e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Sour
|
||||||
}
|
}
|
||||||
|
|
||||||
e_comp->wl_comp_data->selection.data_source = sel_source = source;
|
e_comp->wl_comp_data->selection.data_source = sel_source = source;
|
||||||
|
e_comp->wl_comp_data->clipboard.xwl_owner = NULL;
|
||||||
e_comp->wl_comp_data->selection.serial = serial;
|
e_comp->wl_comp_data->selection.serial = serial;
|
||||||
|
|
||||||
if (e_comp->wl_comp_data->kbd.enabled)
|
if (e_comp->wl_comp_data->kbd.enabled)
|
||||||
|
|
|
@ -131,7 +131,11 @@ _xwayland_cancelled_send(E_Comp_Wl_Data_Source *source)
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_xwl_fixes_selection_notify(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_X_Event_Fixes_Selection_Notify *ev)
|
_xwl_fixes_selection_notify(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_X_Event_Fixes_Selection_Notify *ev)
|
||||||
{
|
{
|
||||||
if (ev->owner == e_comp->cm_selection) return ECORE_CALLBACK_RENEW;
|
if (ev->owner == e_comp->cm_selection)
|
||||||
|
{
|
||||||
|
e_comp->wl_comp_data->clipboard.xwl_owner = NULL;
|
||||||
|
return ECORE_CALLBACK_RENEW;
|
||||||
|
}
|
||||||
if (ev->atom == ECORE_X_ATOM_SELECTION_XDND)
|
if (ev->atom == ECORE_X_ATOM_SELECTION_XDND)
|
||||||
{
|
{
|
||||||
if (ev->owner)
|
if (ev->owner)
|
||||||
|
@ -201,7 +205,10 @@ _xwl_fixes_selection_notify(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_X_Even
|
||||||
e_screensaver_inhibit_toggle(!!ev->owner);
|
e_screensaver_inhibit_toggle(!!ev->owner);
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
//if (ev->atom == ECORE_X_ATOM_SELECTION_CLIPBOARD)
|
if (ev->atom == ECORE_X_ATOM_SELECTION_CLIPBOARD)
|
||||||
|
{
|
||||||
|
e_comp->wl_comp_data->clipboard.xwl_owner = ev->owner ? e_pixmap_find_client(E_PIXMAP_TYPE_X, ev->owner) : NULL;
|
||||||
|
}
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue