From 4d92808e65d4064e126b48f837739c07d605a9b4 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 7 Jul 2017 16:26:32 -0400 Subject: [PATCH] use kbd focus resource's client instead of "focused" client in data device --- src/bin/e_comp_wl_data.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c index d42edc2a9..ff0120139 100644 --- a/src/bin/e_comp_wl_data.c +++ b/src/bin/e_comp_wl_data.c @@ -1087,6 +1087,7 @@ e_comp_wl_data_device_keyboard_focus_set(void) { struct wl_resource *data_device_res, *offer_res = NULL, *focus; E_Comp_Wl_Data_Source *source; + E_Client *focused; if (!e_comp_wl->kbd.enabled) { @@ -1099,6 +1100,7 @@ e_comp_wl_data_device_keyboard_focus_set(void) ERR("No focused resource"); return; } + focused = wl_resource_get_user_data(focus); source = (E_Comp_Wl_Data_Source *)e_comp_wl->selection.data_source; #ifndef HAVE_WAYLAND_ONLY @@ -1107,10 +1109,10 @@ e_comp_wl_data_device_keyboard_focus_set(void) if (!e_comp_util_has_xwayland()) break; if (e_comp_wl->clipboard.xwl_owner) { - if (e_client_has_xwindow(e_client_focused_get())) return; + if (e_client_has_xwindow(focused)) return; break; } - else if (source && e_client_has_xwindow(e_client_focused_get())) + else if (source && e_client_has_xwindow(focused)) { /* wl -> x11 */ ecore_x_selection_owner_set(e_comp->cm_selection,