diff options
author | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-05-26 16:34:10 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2017-05-26 16:27:43 -0400 |
commit | d4ce9b1ac38b6297ceccc8cdbb9b0bb2e8f3ec66 (patch) | |
tree | fb0ae567ebf72457ed10ac75d2ae94e79c3ac30f /src/lib | |
parent | cf6fc05610a60873cfa890d8e39626024527e94a (diff) |
elput: store output w/h and apply to devices on creation
fix async device initialization for devices which need this (e.g., touchpads)
@fix
Diffstat (limited to '')
-rw-r--r-- | src/lib/elput/elput_evdev.c | 2 | ||||
-rw-r--r-- | src/lib/elput/elput_input.c | 3 | ||||
-rw-r--r-- | src/lib/elput/elput_private.h | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index b4118fe82f..a212691787 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c | |||
@@ -1555,6 +1555,8 @@ _evdev_device_create(Elput_Seat *seat, struct libinput_device *device) | |||
1555 | edev->seat = seat; | 1555 | edev->seat = seat; |
1556 | edev->device = device; | 1556 | edev->device = device; |
1557 | edev->caps = 0; | 1557 | edev->caps = 0; |
1558 | edev->ow = seat->manager->output_w; | ||
1559 | edev->oh = seat->manager->output_h; | ||
1558 | 1560 | ||
1559 | oname = libinput_device_get_output_name(device); | 1561 | oname = libinput_device_get_output_name(device); |
1560 | eina_stringshare_replace(&edev->output_name, oname); | 1562 | eina_stringshare_replace(&edev->output_name, oname); |
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index ce3fac25e3..9366ff9b51 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c | |||
@@ -569,6 +569,9 @@ elput_input_devices_calibrate(Elput_Manager *manager, int w, int h) | |||
569 | 569 | ||
570 | EINA_SAFETY_ON_NULL_RETURN(manager); | 570 | EINA_SAFETY_ON_NULL_RETURN(manager); |
571 | 571 | ||
572 | manager->output_w = w; | ||
573 | manager->output_h = h; | ||
574 | |||
572 | EINA_LIST_FOREACH(manager->input.seats, l, eseat) | 575 | EINA_LIST_FOREACH(manager->input.seats, l, eseat) |
573 | { | 576 | { |
574 | EINA_LIST_FOREACH(eseat->devices, ll, edev) | 577 | EINA_LIST_FOREACH(eseat->devices, ll, edev) |
diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h index 25d820e48d..982d3f58c0 100644 --- a/src/lib/elput/elput_private.h +++ b/src/lib/elput/elput_private.h | |||
@@ -253,6 +253,7 @@ struct _Elput_Manager | |||
253 | struct xkb_context *context; | 253 | struct xkb_context *context; |
254 | int group; | 254 | int group; |
255 | } cached; | 255 | } cached; |
256 | int output_w, output_h; | ||
256 | 257 | ||
257 | Elput_Input input; | 258 | Elput_Input input; |
258 | Eina_Bool del : 1; | 259 | Eina_Bool del : 1; |