elput: store output w/h and apply to devices on creation

fix async device initialization for devices which need this (e.g., touchpads)

@fix
This commit is contained in:
Mike Blumenkrantz 2017-05-26 16:34:10 -04:00
parent cf6fc05610
commit d4ce9b1ac3
3 changed files with 6 additions and 0 deletions

View File

@ -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);

View File

@ -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)

View File

@ -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;