tablet: pass motion events to implicitly grabbed surface

Refs swaywm/sway#5302.
This commit is contained in:
Tudor Brindus 2020-05-04 17:44:08 -04:00 committed by Simon Ser
parent 42e485dcc3
commit 74c0d03f00

View file

@ -792,18 +792,6 @@ static void implicit_tool_up(struct wlr_tablet_tool_v2_grab *grab) {
check_and_release_implicit_grab(grab); check_and_release_implicit_grab(grab);
} }
/* Only send the motion event, when we are over the surface for now */
static void implicit_tool_motion(
struct wlr_tablet_tool_v2_grab *grab, double x, double y) {
struct implicit_grab_state *state = grab->data;
if (state->focused != state->original) {
return;
}
wlr_send_tablet_v2_tablet_tool_motion(grab->tool, x, y);
}
static void implicit_tool_button( static void implicit_tool_button(
struct wlr_tablet_tool_v2_grab *grab, uint32_t button, struct wlr_tablet_tool_v2_grab *grab, uint32_t button,
enum zwp_tablet_pad_v2_button_state state) { enum zwp_tablet_pad_v2_button_state state) {
@ -822,7 +810,7 @@ static const struct wlr_tablet_tool_v2_grab_interface
.proximity_in = implicit_tool_proximity_in, .proximity_in = implicit_tool_proximity_in,
.down = implicit_tool_down, .down = implicit_tool_down,
.up = implicit_tool_up, .up = implicit_tool_up,
.motion = implicit_tool_motion, .motion = default_tool_motion,
.pressure = default_tool_pressure, .pressure = default_tool_pressure,
.distance = default_tool_distance, .distance = default_tool_distance,
.tilt = default_tool_tilt, .tilt = default_tool_tilt,