forked from enlightenment/efl
elput: Create and send seat frame events when we need to
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
parent
b764978f29
commit
5db91e3802
|
@ -52,7 +52,14 @@ typedef struct _Elput_Event_Seat_Caps
|
|||
Elput_Seat *seat;
|
||||
} Elput_Event_Seat_Caps;
|
||||
|
||||
/* structure to represent event for seat frame */
|
||||
typedef struct _Elput_Event_Seat_Frame
|
||||
{
|
||||
Elput_Seat *seat;
|
||||
} Elput_Event_Seat_Frame;
|
||||
|
||||
EAPI extern int ELPUT_EVENT_SEAT_CAPS;
|
||||
EAPI extern int ELPUT_EVENT_SEAT_FRAME;
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
|
|
@ -7,6 +7,7 @@ static int _elput_init_count = 0;
|
|||
int _elput_log_dom = -1;
|
||||
|
||||
EAPI int ELPUT_EVENT_SEAT_CAPS = -1;
|
||||
EAPI int ELPUT_EVENT_SEAT_FRAME = -1;
|
||||
|
||||
EAPI int
|
||||
elput_init(void)
|
||||
|
@ -26,6 +27,7 @@ elput_init(void)
|
|||
}
|
||||
|
||||
ELPUT_EVENT_SEAT_CAPS = ecore_event_type_new();
|
||||
ELPUT_EVENT_SEAT_FRAME = ecore_event_type_new();
|
||||
|
||||
return _elput_init_count;
|
||||
|
||||
|
@ -48,6 +50,7 @@ elput_shutdown(void)
|
|||
if (--_elput_init_count != 0) return _elput_init_count;
|
||||
|
||||
ELPUT_EVENT_SEAT_CAPS = -1;
|
||||
ELPUT_EVENT_SEAT_FRAME = -1;
|
||||
|
||||
eina_log_domain_unregister(_elput_log_dom);
|
||||
_elput_log_dom = -1;
|
||||
|
|
|
@ -16,6 +16,18 @@ _seat_caps_update(Elput_Seat *seat)
|
|||
ecore_event_add(ELPUT_EVENT_SEAT_CAPS, ev, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_seat_frame_send(Elput_Seat *seat)
|
||||
{
|
||||
Elput_Event_Seat_Frame *ev;
|
||||
|
||||
ev = calloc(1, sizeof(Elput_Event_Seat_Frame));
|
||||
if (!ev) return;
|
||||
|
||||
ev->seat = seat;
|
||||
ecore_event_add(ELPUT_EVENT_SEAT_FRAME, ev, NULL, NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
_keyboard_fd_get(off_t size)
|
||||
{
|
||||
|
@ -373,10 +385,7 @@ _evdev_event_process(struct libinput_event *event)
|
|||
Elput_Device *edev;
|
||||
|
||||
edev = libinput_device_get_user_data(idev);
|
||||
if (edev)
|
||||
{
|
||||
/* TODO: send seat frame event ?? */
|
||||
}
|
||||
if (edev) _seat_frame_send(edev->seat);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue