aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorGuilherme Iscaro <iscaro@profusion.mobi>2016-11-14 11:03:56 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-11-16 18:26:25 +0900
commit9ba11c5cd020b6ec5cb78dfaeda2d4c0472659ab (patch)
tree12249aaf1cee595bf341bf97b0d1f0bad242c83c /src/lib/ecore_wl2/ecore_wl2_input.c
parentelm: config: remove datetime module (diff)
downloadefl-9ba11c5cd020b6ec5cb78dfaeda2d4c0472659ab.tar.gz
Ecore Evas Wayland: Create the devices during Ecore_Evas setup.
Summary: When launching an Elementary App using Wayland the elm_config will automatically connect to the Wayland's display server and all events regarding seats are lost, since by the time that Ecore_Evas is created the global events were already dispatched. To fix this problem, everytime an Ecore_Evas is created, the code must check if there are any seat capabilities available, if so, the devices will be created. Reviewers: bdilly, barbieri, cedric, jpeg Subscribers: devilhorns, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4390
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 830c6adbeb..a17c665a0a 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1572,3 +1572,29 @@ ecore_wl2_input_seat_get(Ecore_Wl2_Input *input)
return input->wl.seat;
}
+
+EAPI Ecore_Wl2_Seat_Capabilities
+ecore_wl2_input_seat_capabilities_get(Ecore_Wl2_Input *input)
+{
+
+ Ecore_Wl2_Seat_Capabilities cap = ECORE_WL2_SEAT_CAPABILITIES_NONE;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(input, ECORE_WL2_SEAT_CAPABILITIES_NO_SEAT);
+
+ if (!input->wl.seat)
+ return ECORE_WL2_SEAT_CAPABILITIES_NO_SEAT;
+ if (input->wl.keyboard)
+ cap |= ECORE_WL2_SEAT_CAPABILITIES_KEYBOARD;
+ if (input->wl.pointer)
+ cap |= ECORE_WL2_SEAT_CAPABILITIES_POINTER;
+ if (input->wl.touch)
+ cap |= ECORE_WL2_SEAT_CAPABILITIES_TOUCH;
+ return cap;
+}
+
+EAPI unsigned int
+ecore_wl2_input_seat_id_get(Ecore_Wl2_Input *input)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(input, 0);
+ return input->id;
+}