|
|
@ -165,8 +165,7 @@ weston_client_launch(struct weston_compositor *compositor, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
surface_handle_buffer_destroy(struct wl_listener *listener, |
|
|
|
surface_handle_buffer_destroy(struct wl_listener *listener, void *data) |
|
|
|
struct wl_resource *resource) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_surface *es = |
|
|
|
struct weston_surface *es = |
|
|
|
container_of(listener, struct weston_surface,
|
|
|
|
container_of(listener, struct weston_surface,
|
|
|
@ -208,7 +207,7 @@ weston_surface_create(struct weston_compositor *compositor) |
|
|
|
if (surface == NULL) |
|
|
|
if (surface == NULL) |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|
|
|
|
|
|
|
|
|
wl_list_init(&surface->surface.resource.destroy_listener_list); |
|
|
|
wl_signal_init(&surface->surface.resource.destroy_signal); |
|
|
|
|
|
|
|
|
|
|
|
wl_list_init(&surface->link); |
|
|
|
wl_list_init(&surface->link); |
|
|
|
wl_list_init(&surface->layer_link); |
|
|
|
wl_list_init(&surface->layer_link); |
|
|
@ -230,7 +229,7 @@ weston_surface_create(struct weston_compositor *compositor) |
|
|
|
pixman_region32_init(&surface->transform.opaque); |
|
|
|
pixman_region32_init(&surface->transform.opaque); |
|
|
|
wl_list_init(&surface->frame_callback_list); |
|
|
|
wl_list_init(&surface->frame_callback_list); |
|
|
|
|
|
|
|
|
|
|
|
surface->buffer_destroy_listener.func = surface_handle_buffer_destroy; |
|
|
|
surface->buffer_destroy_listener.notify = surface_handle_buffer_destroy; |
|
|
|
|
|
|
|
|
|
|
|
wl_list_init(&surface->geometry.transformation_list); |
|
|
|
wl_list_init(&surface->geometry.transformation_list); |
|
|
|
wl_list_insert(&surface->geometry.transformation_list, |
|
|
|
wl_list_insert(&surface->geometry.transformation_list, |
|
|
@ -686,8 +685,8 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
buffer->busy_count++; |
|
|
|
buffer->busy_count++; |
|
|
|
wl_list_insert(es->buffer->resource.destroy_listener_list.prev, |
|
|
|
wl_signal_add(&es->buffer->resource.destroy_signal, |
|
|
|
&es->buffer_destroy_listener.link); |
|
|
|
&es->buffer_destroy_listener); |
|
|
|
|
|
|
|
|
|
|
|
if (es->geometry.width != buffer->width || |
|
|
|
if (es->geometry.width != buffer->width || |
|
|
|
es->geometry.height != buffer->height) { |
|
|
|
es->geometry.height != buffer->height) { |
|
|
@ -1660,8 +1659,7 @@ notify_pointer_focus(struct wl_input_device *device, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
destroy_device_saved_kbd_focus(struct wl_listener *listener, |
|
|
|
destroy_device_saved_kbd_focus(struct wl_listener *listener, void *data) |
|
|
|
struct wl_resource *resource) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_input_device *wd; |
|
|
|
struct weston_input_device *wd; |
|
|
|
|
|
|
|
|
|
|
@ -1706,10 +1704,10 @@ notify_keyboard_focus(struct wl_input_device *device, struct wl_array *keys) |
|
|
|
|
|
|
|
|
|
|
|
if (surface) { |
|
|
|
if (surface) { |
|
|
|
wd->saved_kbd_focus = surface; |
|
|
|
wd->saved_kbd_focus = surface; |
|
|
|
wd->saved_kbd_focus_listener.func = |
|
|
|
wd->saved_kbd_focus_listener.notify = |
|
|
|
destroy_device_saved_kbd_focus; |
|
|
|
destroy_device_saved_kbd_focus; |
|
|
|
wl_list_insert(surface->resource.destroy_listener_list.prev, |
|
|
|
wl_signal_add(&surface->resource.destroy_signal, |
|
|
|
&wd->saved_kbd_focus_listener.link); |
|
|
|
&wd->saved_kbd_focus_listener); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
wl_input_device_set_keyboard_focus(&wd->input_device, NULL); |
|
|
|
wl_input_device_set_keyboard_focus(&wd->input_device, NULL); |
|
|
@ -1738,8 +1736,7 @@ find_resource_for_surface(struct wl_list *list, struct wl_surface *surface) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
lose_touch_focus_resource(struct wl_listener *listener, |
|
|
|
lose_touch_focus_resource(struct wl_listener *listener, void *data) |
|
|
|
struct wl_resource *resource) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_input_device *device = |
|
|
|
struct weston_input_device *device = |
|
|
|
container_of(listener, struct weston_input_device, |
|
|
|
container_of(listener, struct weston_input_device, |
|
|
@ -1749,8 +1746,7 @@ lose_touch_focus_resource(struct wl_listener *listener, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
lose_touch_focus(struct wl_listener *listener, |
|
|
|
lose_touch_focus(struct wl_listener *listener, void *data) |
|
|
|
struct wl_resource *resource) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_input_device *device = |
|
|
|
struct weston_input_device *device = |
|
|
|
container_of(listener, struct weston_input_device, |
|
|
|
container_of(listener, struct weston_input_device, |
|
|
@ -1778,13 +1774,13 @@ touch_set_focus(struct weston_input_device *device, |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
device->touch_focus_resource_listener.func = |
|
|
|
device->touch_focus_resource_listener.notify = |
|
|
|
lose_touch_focus_resource; |
|
|
|
lose_touch_focus_resource; |
|
|
|
wl_list_insert(resource->destroy_listener_list.prev, |
|
|
|
wl_signal_add(&resource->destroy_signal, |
|
|
|
&device->touch_focus_resource_listener.link); |
|
|
|
&device->touch_focus_resource_listener); |
|
|
|
device->touch_focus_listener.func = lose_touch_focus; |
|
|
|
device->touch_focus_listener.notify = lose_touch_focus; |
|
|
|
wl_list_insert(surface->resource.destroy_listener_list.prev, |
|
|
|
wl_signal_add(&surface->resource.destroy_signal, |
|
|
|
&device->touch_focus_listener.link); |
|
|
|
&device->touch_focus_listener); |
|
|
|
|
|
|
|
|
|
|
|
device->touch_focus = surface; |
|
|
|
device->touch_focus = surface; |
|
|
|
device->touch_focus_resource = resource; |
|
|
|
device->touch_focus_resource = resource; |
|
|
@ -1909,8 +1905,7 @@ static const struct wl_input_device_interface input_device_interface = { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
handle_drag_surface_destroy(struct wl_listener *listener, |
|
|
|
handle_drag_surface_destroy(struct wl_listener *listener, void *data) |
|
|
|
struct wl_resource *resource) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_input_device *device; |
|
|
|
struct weston_input_device *device; |
|
|
|
|
|
|
|
|
|
|
@ -1940,8 +1935,7 @@ bind_input_device(struct wl_client *client, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
static void |
|
|
|
device_handle_new_drag_icon(struct wl_listener *listener, |
|
|
|
device_handle_new_drag_icon(struct wl_listener *listener, void *data) |
|
|
|
struct wl_resource *resource) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
struct weston_input_device *device; |
|
|
|
struct weston_input_device *device; |
|
|
|
|
|
|
|
|
|
|
@ -1969,13 +1963,14 @@ weston_input_device_init(struct weston_input_device *device, |
|
|
|
device->modifier_state = 0; |
|
|
|
device->modifier_state = 0; |
|
|
|
device->num_tp = 0; |
|
|
|
device->num_tp = 0; |
|
|
|
|
|
|
|
|
|
|
|
device->drag_surface_destroy_listener.func = handle_drag_surface_destroy; |
|
|
|
device->drag_surface_destroy_listener.notify = |
|
|
|
|
|
|
|
handle_drag_surface_destroy; |
|
|
|
|
|
|
|
|
|
|
|
wl_list_insert(ec->input_device_list.prev, &device->link); |
|
|
|
wl_list_insert(ec->input_device_list.prev, &device->link); |
|
|
|
|
|
|
|
|
|
|
|
device->new_drag_icon_listener.func = device_handle_new_drag_icon; |
|
|
|
device->new_drag_icon_listener.notify = device_handle_new_drag_icon; |
|
|
|
wl_list_insert(device->input_device.drag_icon_listener_list.prev, |
|
|
|
wl_signal_add(&device->input_device.drag_icon_signal, |
|
|
|
&device->new_drag_icon_listener.link); |
|
|
|
&device->new_drag_icon_listener); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WL_EXPORT void |
|
|
|
WL_EXPORT void |
|
|
@ -2018,8 +2013,8 @@ device_setup_new_drag_surface(struct weston_input_device *device, |
|
|
|
|
|
|
|
|
|
|
|
surface->configure = drag_surface_configure; |
|
|
|
surface->configure = drag_surface_configure; |
|
|
|
|
|
|
|
|
|
|
|
wl_list_insert(surface->surface.resource.destroy_listener_list.prev, |
|
|
|
wl_signal_add(&surface->surface.resource.destroy_signal, |
|
|
|
&device->drag_surface_destroy_listener.link); |
|
|
|
&device->drag_surface_destroy_listener); |
|
|
|
|
|
|
|
|
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|