discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d4ce9b1ac38b6297ceccc8cdbb9b0bb2e8f3ec66

commit d4ce9b1ac38b6297ceccc8cdbb9b0bb2e8f3ec66
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri May 26 16:34:10 2017 -0400

    elput: store output w/h and apply to devices on creation
    
    fix async device initialization for devices which need this (e.g., 
touchpads)
    
    @fix
---
 src/lib/elput/elput_evdev.c   | 2 ++
 src/lib/elput/elput_input.c   | 3 +++
 src/lib/elput/elput_private.h | 1 +
 3 files changed, 6 insertions(+)

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)
    edev->seat = seat;
    edev->device = device;
    edev->caps = 0;
+   edev->ow = seat->manager->output_w;
+   edev->oh = seat->manager->output_h;
 
    oname = libinput_device_get_output_name(device);
    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)
 
    EINA_SAFETY_ON_NULL_RETURN(manager);
 
+   manager->output_w = w;
+   manager->output_h = h;
+
    EINA_LIST_FOREACH(manager->input.seats, l, eseat)
      {
         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
         struct xkb_context *context;
         int group;
      } cached;
+   int output_w, output_h;
 
    Elput_Input input;
    Eina_Bool del : 1;

-- 


Reply via email to