aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-23 17:43:58 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-06-23 17:43:44 -0400
commit34ce5d648f66bd16e8902335756ca40caca55f2e (patch)
tree1506bdc3a44b3b17f690368f390fbdf5a0e19c90 /src/lib/elementary/efl_ui_win.c
parentevas: check object layer existence before deref to avoid crash (diff)
downloadefl-34ce5d648f66bd16e8902335756ca40caca55f2e.tar.gz
elm_win: access wl seats in a more portable way
seat names are not guaranteed to be the same in every compositor so this should not be hardcoded
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 39ee0b775f..12bffbda5e 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -3143,10 +3143,12 @@ _elm_win_wl_cursor_set(Evas_Object *obj, const char *cursor)
{
/* FIXME: multiseat */
Ecore_Wl2_Input *input;
+ Eina_Iterator *it;
- input = ecore_wl2_display_input_find_by_name(ecore_wl2_window_display_get(sd->wl.win), "default");
- EINA_SAFETY_ON_NULL_RETURN(input);
- ecore_wl2_input_pointer_set(input, sd->pointer.surf, sd->pointer.hot_x, sd->pointer.hot_y);
+ it = ecore_wl2_display_inputs_get(ecore_wl2_window_display_get(sd->wl.win));
+ EINA_ITERATOR_FOREACH(it, input)
+ ecore_wl2_input_pointer_set(input, sd->pointer.surf, sd->pointer.hot_x, sd->pointer.hot_y);
+ eina_iterator_free(it);
}
}
#endif
@@ -4115,8 +4117,12 @@ _elm_win_frame_cb_menu(void *data,
if (x < 0) x += wx;
if (y < 0) y += wy;
- input = ecore_wl2_display_input_find_by_name(ecore_wl2_window_display_get(sd->wl.win), "default");
-
+ {
+ Eina_Iterator *it;
+ it = ecore_wl2_display_inputs_get(ecore_wl2_window_display_get(sd->wl.win));
+ EINA_ITERATOR_FOREACH(it, input) break;
+ eina_iterator_free(it);
+ }
if (sd->wl.win->zxdg_toplevel)
zxdg_toplevel_v6_show_window_menu(sd->wl.win->zxdg_toplevel,
ecore_wl2_input_seat_get(input), 0, x, y);