Added pointer frame events
This commit is contained in:
parent
1cd97c3270
commit
9ea7f88753
@ -107,7 +107,8 @@ enum
|
||||
UWAC_EVENT_CLIPBOARD_SELECT,
|
||||
UWAC_EVENT_CLIPBOARD_OFFER,
|
||||
UWAC_EVENT_OUTPUT_GEOMETRY,
|
||||
UWAC_EVENT_POINTER_AXIS_DISCRETE
|
||||
UWAC_EVENT_POINTER_AXIS_DISCRETE,
|
||||
UWAC_EVENT_POINTER_FRAME
|
||||
};
|
||||
|
||||
/** @brief window states */
|
||||
@ -195,6 +196,14 @@ struct uwac_pointer_axis_event
|
||||
};
|
||||
typedef struct uwac_pointer_axis_event UwacPointerAxisEvent;
|
||||
|
||||
struct uwac_pointer_frame_event
|
||||
{
|
||||
int type;
|
||||
UwacWindow* window;
|
||||
UwacSeat* seat;
|
||||
};
|
||||
typedef struct uwac_pointer_frame_event UwacPointerFrameEvent;
|
||||
|
||||
struct uwac_touch_frame_event
|
||||
{
|
||||
int type;
|
||||
@ -286,6 +295,7 @@ union uwac_event {
|
||||
UwacPointerMotionEvent mouse_motion;
|
||||
UwacPointerButtonEvent mouse_button;
|
||||
UwacPointerAxisEvent mouse_axis;
|
||||
UwacPointerFrameEvent mouse_frame;
|
||||
UwacKeyboardEnterLeaveEvent keyboard_enter_leave;
|
||||
UwacKeyboardModifiersEvent keyboard_modifiers;
|
||||
UwacClipboardEvent clipboard;
|
||||
|
@ -844,7 +844,19 @@ static void pointer_handle_axis(void* data, struct wl_pointer* pointer, uint32_t
|
||||
|
||||
static void pointer_frame(void* data, struct wl_pointer* wl_pointer)
|
||||
{
|
||||
/*UwacSeat *seat = data;*/
|
||||
UwacPointerFrameEvent* event;
|
||||
UwacSeat* seat = data;
|
||||
UwacWindow* window = seat->pointer_focus;
|
||||
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
event = (UwacPointerFrameEvent*)UwacDisplayNewEvent(seat->display, UWAC_EVENT_POINTER_FRAME);
|
||||
if (!event)
|
||||
return;
|
||||
|
||||
event->seat = seat;
|
||||
event->window = window;
|
||||
}
|
||||
|
||||
static void pointer_axis_source(void* data, struct wl_pointer* wl_pointer, uint32_t axis_source)
|
||||
|
Loading…
Reference in New Issue
Block a user