Lines Matching refs:seat
42 struct weston_seat *seat; member
53 static void weston_desktop_seat_popup_grab_end(struct weston_desktop_seat *seat);
79 struct weston_desktop_seat *seat = in weston_desktop_seat_popup_grab_keyboard_cancel() local
80 wl_container_of(grab, seat, popup_grab.keyboard); in weston_desktop_seat_popup_grab_keyboard_cancel()
82 weston_desktop_seat_popup_grab_end(seat); in weston_desktop_seat_popup_grab_keyboard_cancel()
94 struct weston_desktop_seat *seat = in weston_desktop_seat_popup_grab_pointer_focus() local
95 wl_container_of(grab, seat, popup_grab.pointer); in weston_desktop_seat_popup_grab_pointer_focus()
100 view = weston_compositor_pick_view(pointer->seat->compositor, in weston_desktop_seat_popup_grab_pointer_focus()
105 wl_resource_get_client(view->surface->resource) == seat->popup_grab.client) in weston_desktop_seat_popup_grab_pointer_focus()
125 struct weston_desktop_seat *seat = in weston_desktop_seat_popup_grab_pointer_button() local
126 wl_container_of(grab, seat, popup_grab.pointer); in weston_desktop_seat_popup_grab_pointer_button()
128 bool initial_up = seat->popup_grab.initial_up; in weston_desktop_seat_popup_grab_pointer_button()
131 seat->popup_grab.initial_up = true; in weston_desktop_seat_popup_grab_pointer_button()
138 weston_desktop_seat_popup_grab_end(seat); in weston_desktop_seat_popup_grab_pointer_button()
165 struct weston_desktop_seat *seat = in weston_desktop_seat_popup_grab_pointer_cancel() local
166 wl_container_of(grab, seat, popup_grab.pointer); in weston_desktop_seat_popup_grab_pointer_cancel()
168 weston_desktop_seat_popup_grab_end(seat); in weston_desktop_seat_popup_grab_pointer_cancel()
216 struct weston_desktop_seat *seat = in weston_desktop_seat_popup_grab_touch_cancel() local
217 wl_container_of(grab, seat, popup_grab.touch); in weston_desktop_seat_popup_grab_touch_cancel()
219 weston_desktop_seat_popup_grab_end(seat); in weston_desktop_seat_popup_grab_touch_cancel()
233 struct weston_desktop_seat *seat = in weston_desktop_seat_destroy() local
234 wl_container_of(listener, seat, seat_destroy_listener); in weston_desktop_seat_destroy()
236 free(seat); in weston_desktop_seat_destroy()
243 struct weston_desktop_seat *seat; in weston_desktop_seat_from_seat() local
251 return wl_container_of(listener, seat, seat_destroy_listener); in weston_desktop_seat_from_seat()
253 seat = zalloc(sizeof(struct weston_desktop_seat)); in weston_desktop_seat_from_seat()
254 if (seat == NULL) in weston_desktop_seat_from_seat()
257 seat->seat = wseat; in weston_desktop_seat_from_seat()
259 seat->seat_destroy_listener.notify = weston_desktop_seat_destroy; in weston_desktop_seat_from_seat()
260 wl_signal_add(&wseat->destroy_signal, &seat->seat_destroy_listener); in weston_desktop_seat_from_seat()
262 seat->popup_grab.keyboard.interface = in weston_desktop_seat_from_seat()
264 seat->popup_grab.pointer.interface = in weston_desktop_seat_from_seat()
266 seat->popup_grab.touch.interface = in weston_desktop_seat_from_seat()
268 wl_list_init(&seat->popup_grab.surfaces); in weston_desktop_seat_from_seat()
270 return seat; in weston_desktop_seat_from_seat()
274 weston_desktop_seat_popup_grab_get_topmost_surface(struct weston_desktop_seat *seat) in weston_desktop_seat_popup_grab_get_topmost_surface() argument
276 if (seat == NULL || wl_list_empty(&seat->popup_grab.surfaces)) in weston_desktop_seat_popup_grab_get_topmost_surface()
279 struct wl_list *grab_link = seat->popup_grab.surfaces.next; in weston_desktop_seat_popup_grab_get_topmost_surface()
285 weston_desktop_seat_popup_grab_start(struct weston_desktop_seat *seat, in weston_desktop_seat_popup_grab_start() argument
288 assert(seat == NULL || seat->popup_grab.client == NULL || in weston_desktop_seat_popup_grab_start()
289 seat->popup_grab.client == client); in weston_desktop_seat_popup_grab_start()
291 struct weston_seat *wseat = seat != NULL ? seat->seat : NULL; in weston_desktop_seat_popup_grab_start()
305 weston_keyboard_start_grab(keyboard, &seat->popup_grab.keyboard); in weston_desktop_seat_popup_grab_start()
309 weston_pointer_start_grab(pointer, &seat->popup_grab.pointer); in weston_desktop_seat_popup_grab_start()
313 weston_touch_start_grab(touch, &seat->popup_grab.touch); in weston_desktop_seat_popup_grab_start()
315 seat->popup_grab.initial_up = in weston_desktop_seat_popup_grab_start()
317 seat->popup_grab.client = client; in weston_desktop_seat_popup_grab_start()
323 weston_desktop_seat_popup_grab_end(struct weston_desktop_seat *seat) in weston_desktop_seat_popup_grab_end() argument
325 struct weston_keyboard *keyboard = weston_seat_get_keyboard(seat->seat); in weston_desktop_seat_popup_grab_end()
326 struct weston_pointer *pointer = weston_seat_get_pointer(seat->seat); in weston_desktop_seat_popup_grab_end()
327 struct weston_touch *touch = weston_seat_get_touch(seat->seat); in weston_desktop_seat_popup_grab_end()
329 while (!wl_list_empty(&seat->popup_grab.surfaces)) { in weston_desktop_seat_popup_grab_end()
330 struct wl_list *link = seat->popup_grab.surfaces.prev; in weston_desktop_seat_popup_grab_end()
351 seat->popup_grab.client = NULL; in weston_desktop_seat_popup_grab_end()
355 weston_desktop_seat_popup_grab_add_surface(struct weston_desktop_seat *seat, in weston_desktop_seat_popup_grab_add_surface() argument
358 assert(seat->popup_grab.client != NULL); in weston_desktop_seat_popup_grab_add_surface()
360 wl_list_insert(&seat->popup_grab.surfaces, link); in weston_desktop_seat_popup_grab_add_surface()
364 weston_desktop_seat_popup_grab_remove_surface(struct weston_desktop_seat *seat, in weston_desktop_seat_popup_grab_remove_surface() argument
367 assert(seat->popup_grab.client != NULL); in weston_desktop_seat_popup_grab_remove_surface()
371 if (wl_list_empty(&seat->popup_grab.surfaces)) in weston_desktop_seat_popup_grab_remove_surface()
372 weston_desktop_seat_popup_grab_end(seat); in weston_desktop_seat_popup_grab_remove_surface()
378 struct weston_desktop_seat *seat = weston_desktop_seat_from_seat(wseat); in weston_seat_break_desktop_grabs() local
380 weston_desktop_seat_popup_grab_end(seat); in weston_seat_break_desktop_grabs()