input: Pass axis events through pointer grab interfaces
Don't only send motions and buttons but also axis events through the pointer grab interface. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
@@ -385,6 +385,12 @@ exposay_button(struct weston_pointer_grab *grab, uint32_t time, uint32_t button,
|
||||
shell->exposay.clicked = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
exposay_axis(struct weston_pointer_grab *grab,
|
||||
uint32_t time, uint32_t axis, wl_fixed_t value)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
exposay_pointer_grab_cancel(struct weston_pointer_grab *grab)
|
||||
{
|
||||
@@ -398,6 +404,7 @@ static const struct weston_pointer_grab_interface exposay_ptr_grab = {
|
||||
exposay_focus,
|
||||
exposay_motion,
|
||||
exposay_button,
|
||||
exposay_axis,
|
||||
exposay_pointer_grab_cancel,
|
||||
};
|
||||
|
||||
|
||||
@@ -1700,6 +1700,12 @@ noop_grab_focus(struct weston_pointer_grab *grab)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
noop_grab_axis(struct weston_pointer_grab *grab,
|
||||
uint32_t time, uint32_t axis, wl_fixed_t value)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
constrain_position(struct weston_move_grab *move, int *cx, int *cy)
|
||||
{
|
||||
@@ -1782,6 +1788,7 @@ static const struct weston_pointer_grab_interface move_grab_interface = {
|
||||
noop_grab_focus,
|
||||
move_grab_motion,
|
||||
move_grab_button,
|
||||
noop_grab_axis,
|
||||
move_grab_cancel,
|
||||
};
|
||||
|
||||
@@ -1945,6 +1952,7 @@ static const struct weston_pointer_grab_interface resize_grab_interface = {
|
||||
noop_grab_focus,
|
||||
resize_grab_motion,
|
||||
resize_grab_button,
|
||||
noop_grab_axis,
|
||||
resize_grab_cancel,
|
||||
};
|
||||
|
||||
@@ -2109,6 +2117,7 @@ static const struct weston_pointer_grab_interface busy_cursor_grab_interface = {
|
||||
busy_cursor_grab_focus,
|
||||
busy_cursor_grab_motion,
|
||||
busy_cursor_grab_button,
|
||||
noop_grab_axis,
|
||||
busy_cursor_grab_cancel,
|
||||
};
|
||||
|
||||
@@ -3290,6 +3299,19 @@ popup_grab_button(struct weston_pointer_grab *grab,
|
||||
shseat->popup_grab.initial_up = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
popup_grab_axis(struct weston_pointer_grab *grab,
|
||||
uint32_t time, uint32_t axis, wl_fixed_t value)
|
||||
{
|
||||
struct weston_pointer *pointer = grab->pointer;
|
||||
struct wl_resource *resource;
|
||||
struct wl_list *resource_list;
|
||||
|
||||
resource_list = &pointer->focus_resource_list;
|
||||
wl_resource_for_each(resource, resource_list)
|
||||
wl_pointer_send_axis(resource, time, axis, value);
|
||||
}
|
||||
|
||||
static void
|
||||
popup_grab_cancel(struct weston_pointer_grab *grab)
|
||||
{
|
||||
@@ -3300,6 +3322,7 @@ static const struct weston_pointer_grab_interface popup_grab_interface = {
|
||||
popup_grab_focus,
|
||||
popup_grab_motion,
|
||||
popup_grab_button,
|
||||
popup_grab_axis,
|
||||
popup_grab_cancel,
|
||||
};
|
||||
|
||||
@@ -5000,6 +5023,7 @@ static const struct weston_pointer_grab_interface rotate_grab_interface = {
|
||||
noop_grab_focus,
|
||||
rotate_grab_motion,
|
||||
rotate_grab_button,
|
||||
noop_grab_axis,
|
||||
rotate_grab_cancel,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user