|
|
@ -199,11 +199,9 @@ void wlr_seat_pointer_enter(struct wlr_seat *wlr_seat,
|
|
|
|
wlr_seat->pointer_state.focused_client = client;
|
|
|
|
wlr_seat->pointer_state.focused_client = client;
|
|
|
|
wlr_seat->pointer_state.focused_surface = surface;
|
|
|
|
wlr_seat->pointer_state.focused_surface = surface;
|
|
|
|
if (surface != NULL) {
|
|
|
|
if (surface != NULL) {
|
|
|
|
wlr_seat->pointer_state.sx = sx;
|
|
|
|
wlr_seat_pointer_warp(wlr_seat, sx, sy);
|
|
|
|
wlr_seat->pointer_state.sy = sy;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
wlr_seat->pointer_state.sx = NAN;
|
|
|
|
wlr_seat_pointer_warp(wlr_seat, NAN, NAN);
|
|
|
|
wlr_seat->pointer_state.sy = NAN;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_seat_pointer_focus_change_event event = {
|
|
|
|
struct wlr_seat_pointer_focus_change_event event = {
|
|
|
@ -220,6 +218,11 @@ void wlr_seat_pointer_clear_focus(struct wlr_seat *wlr_seat) {
|
|
|
|
wlr_seat_pointer_enter(wlr_seat, NULL, 0, 0);
|
|
|
|
wlr_seat_pointer_enter(wlr_seat, NULL, 0, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void wlr_seat_pointer_warp(struct wlr_seat *wlr_seat, double sx, double sy) {
|
|
|
|
|
|
|
|
wlr_seat->pointer_state.sx = sx;
|
|
|
|
|
|
|
|
wlr_seat->pointer_state.sy = sy;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void wlr_seat_pointer_send_motion(struct wlr_seat *wlr_seat, uint32_t time,
|
|
|
|
void wlr_seat_pointer_send_motion(struct wlr_seat *wlr_seat, uint32_t time,
|
|
|
|
double sx, double sy) {
|
|
|
|
double sx, double sy) {
|
|
|
|
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
|
|
|
|
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
|
|
|
@ -241,8 +244,7 @@ void wlr_seat_pointer_send_motion(struct wlr_seat *wlr_seat, uint32_t time,
|
|
|
|
wl_fixed_from_double(sy));
|
|
|
|
wl_fixed_from_double(sy));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wlr_seat->pointer_state.sx = sx;
|
|
|
|
wlr_seat_pointer_warp(wlr_seat, sx, sy);
|
|
|
|
wlr_seat->pointer_state.sy = sy;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t wlr_seat_pointer_send_button(struct wlr_seat *wlr_seat, uint32_t time,
|
|
|
|
uint32_t wlr_seat_pointer_send_button(struct wlr_seat *wlr_seat, uint32_t time,
|
|
|
|