|
|
@ -381,7 +381,7 @@ pointer_handle_sprite_destroy(struct wl_listener *listener, void *data) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WL_EXPORT struct weston_pointer * |
|
|
|
WL_EXPORT struct weston_pointer * |
|
|
|
weston_pointer_create(void) |
|
|
|
weston_pointer_create(struct weston_seat *seat) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_pointer *pointer; |
|
|
|
struct weston_pointer *pointer; |
|
|
|
|
|
|
|
|
|
|
@ -391,7 +391,8 @@ weston_pointer_create(void) |
|
|
|
|
|
|
|
|
|
|
|
wl_list_init(&pointer->resource_list); |
|
|
|
wl_list_init(&pointer->resource_list); |
|
|
|
wl_list_init(&pointer->focus_resource_list); |
|
|
|
wl_list_init(&pointer->focus_resource_list); |
|
|
|
pointer->default_grab.interface = &default_pointer_grab_interface; |
|
|
|
weston_pointer_set_default_grab(pointer, |
|
|
|
|
|
|
|
seat->compositor->default_pointer_grab); |
|
|
|
pointer->default_grab.pointer = pointer; |
|
|
|
pointer->default_grab.pointer = pointer; |
|
|
|
pointer->grab = &pointer->default_grab; |
|
|
|
pointer->grab = &pointer->default_grab; |
|
|
|
wl_signal_init(&pointer->focus_signal); |
|
|
|
wl_signal_init(&pointer->focus_signal); |
|
|
@ -417,6 +418,17 @@ weston_pointer_destroy(struct weston_pointer *pointer) |
|
|
|
free(pointer); |
|
|
|
free(pointer); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
|
|
|
weston_pointer_set_default_grab(struct weston_pointer *pointer, |
|
|
|
|
|
|
|
const struct weston_pointer_grab_interface *interface) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (interface) |
|
|
|
|
|
|
|
pointer->default_grab.interface = interface; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
pointer->default_grab.interface = |
|
|
|
|
|
|
|
&default_pointer_grab_interface; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WL_EXPORT struct weston_keyboard * |
|
|
|
WL_EXPORT struct weston_keyboard * |
|
|
|
weston_keyboard_create(void) |
|
|
|
weston_keyboard_create(void) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1839,7 +1851,7 @@ weston_seat_init_pointer(struct weston_seat *seat) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pointer = weston_pointer_create(); |
|
|
|
pointer = weston_pointer_create(seat); |
|
|
|
if (pointer == NULL) |
|
|
|
if (pointer == NULL) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|