|
|
@ -100,7 +100,7 @@ static void seat_view_deco_button(struct roots_seat_view *view, double sx,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void roots_passthrough_cursor(struct roots_cursor *cursor,
|
|
|
|
static void roots_passthrough_cursor(struct roots_cursor *cursor,
|
|
|
|
uint32_t time) {
|
|
|
|
int64_t time) {
|
|
|
|
bool focus_changed;
|
|
|
|
bool focus_changed;
|
|
|
|
double sx, sy;
|
|
|
|
double sx, sy;
|
|
|
|
struct roots_view *view = NULL;
|
|
|
|
struct roots_view *view = NULL;
|
|
|
@ -108,11 +108,13 @@ static void roots_passthrough_cursor(struct roots_cursor *cursor,
|
|
|
|
struct roots_desktop *desktop = seat->input->server->desktop;
|
|
|
|
struct roots_desktop *desktop = seat->input->server->desktop;
|
|
|
|
struct wlr_surface *surface = desktop_surface_at(desktop,
|
|
|
|
struct wlr_surface *surface = desktop_surface_at(desktop,
|
|
|
|
cursor->cursor->x, cursor->cursor->y, &sx, &sy, &view);
|
|
|
|
cursor->cursor->x, cursor->cursor->y, &sx, &sy, &view);
|
|
|
|
|
|
|
|
|
|
|
|
struct wl_client *client = NULL;
|
|
|
|
struct wl_client *client = NULL;
|
|
|
|
if (surface) {
|
|
|
|
if (surface) {
|
|
|
|
client = wl_resource_get_client(surface->resource);
|
|
|
|
client = wl_resource_get_client(surface->resource);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (surface && !roots_seat_allow_input(cursor->seat, surface->resource)) {
|
|
|
|
|
|
|
|
|
|
|
|
if (surface && !roots_seat_allow_input(seat, surface->resource)) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -145,7 +147,7 @@ static void roots_passthrough_cursor(struct roots_cursor *cursor,
|
|
|
|
if (surface) {
|
|
|
|
if (surface) {
|
|
|
|
focus_changed = (seat->seat->pointer_state.focused_surface != surface);
|
|
|
|
focus_changed = (seat->seat->pointer_state.focused_surface != surface);
|
|
|
|
wlr_seat_pointer_notify_enter(seat->seat, surface, sx, sy);
|
|
|
|
wlr_seat_pointer_notify_enter(seat->seat, surface, sx, sy);
|
|
|
|
if (!focus_changed) {
|
|
|
|
if (!focus_changed && time > 0) {
|
|
|
|
wlr_seat_pointer_notify_motion(seat->seat, time, sx, sy);
|
|
|
|
wlr_seat_pointer_notify_motion(seat->seat, time, sx, sy);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -158,6 +160,10 @@ static void roots_passthrough_cursor(struct roots_cursor *cursor,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void roots_cursor_update_focus(struct roots_cursor *cursor) {
|
|
|
|
|
|
|
|
roots_passthrough_cursor(cursor, -1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void roots_cursor_update_position(struct roots_cursor *cursor,
|
|
|
|
void roots_cursor_update_position(struct roots_cursor *cursor,
|
|
|
|
uint32_t time) {
|
|
|
|
uint32_t time) {
|
|
|
|
struct roots_seat *seat = cursor->seat;
|
|
|
|
struct roots_seat *seat = cursor->seat;
|
|
|
|