Skip to content
Commits on Source (8)
......@@ -2895,13 +2895,14 @@ panel_committed(struct weston_surface *es,
weston_surface_map(es);
assert(wl_list_empty(&es->views));
sh_output->panel_view = weston_view_create(es);
weston_view_move_to_layer(sh_output->panel_view,
&shell->panel_layer.view_list);
}
assert(sh_output->panel_view);
pos = weston_coord_global_add(output->pos, sh_output->panel_offset);
weston_view_set_position(sh_output->panel_view, pos);
weston_view_move_to_layer(sh_output->panel_view,
&shell->panel_layer.view_list);
}
static void
......
......@@ -2217,8 +2217,6 @@ void
weston_output_schedule_repaint_reset(struct weston_output *output);
void
weston_output_schedule_repaint_restart(struct weston_output *output);
enum weston_compositor_backend
weston_get_backend_type(struct weston_backend *backend);
void
weston_compositor_schedule_repaint(struct weston_compositor *compositor);
void
......@@ -2475,6 +2473,8 @@ struct weston_backend *
weston_compositor_load_backend(struct weston_compositor *compositor,
enum weston_compositor_backend backend,
struct weston_backend_config *config_base);
enum weston_compositor_backend
weston_get_backend_type(struct weston_backend *backend);
void
weston_compositor_exit(struct weston_compositor *ec);
void *
......
......@@ -209,7 +209,7 @@ weston_coord_surface_sub(struct weston_coord_surface a,
static inline struct weston_coord __attribute__ ((warn_unused_result))
weston_coord_truncate(struct weston_coord in)
{
return (struct weston_coord){ (int)in.x, (int)in.y };
return (struct weston_coord){ (double)(int) in.x, (double)(int) in.y };
}
static inline struct weston_coord_surface __attribute__ ((warn_unused_result))
......
......@@ -1200,6 +1200,14 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client,
{
struct weston_desktop_surface *dsurface =
wl_resource_get_user_data(resource);
if (dsurface == NULL) {
wl_resource_post_error(resource,
ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
"xdg surface already destroyed configure "
"serial: %u", serial);
return;
}
struct weston_desktop_xdg_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
struct weston_desktop_xdg_surface_configure *configure, *temp;
......
......@@ -1414,6 +1414,14 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client,
{
struct weston_desktop_surface *dsurface =
wl_resource_get_user_data(resource);
if (dsurface == NULL) {
wl_resource_post_error(resource,
XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT,
"xdg surface already destroyed configure "
"serial: %u", serial);
return;
}
struct weston_desktop_xdg_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
struct weston_desktop_xdg_surface_configure *configure, *temp;
......
......@@ -3848,6 +3848,9 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
wl_resource_set_implementation(resource, &seat_interface, data,
unbind_resource);
if (version >= WL_SEAT_NAME_SINCE_VERSION)
wl_seat_send_name(resource, seat->seat_name);
if (weston_seat_get_pointer(seat))
caps |= WL_SEAT_CAPABILITY_POINTER;
if (weston_seat_get_keyboard(seat))
......@@ -3856,8 +3859,6 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
caps |= WL_SEAT_CAPABILITY_TOUCH;
wl_seat_send_capabilities(resource, caps);
if (version >= WL_SEAT_NAME_SINCE_VERSION)
wl_seat_send_name(resource, seat->seat_name);
}
static void
......
......@@ -94,6 +94,12 @@ noop_renderer_attach(struct weston_paint_node *pnode)
}
shm_buffer = buffer->shm_buffer;
/* This can happen if a SHM wl_buffer gets destroyed before we attach,
* because wayland-server just nukes the wl_shm_buffer from underneath
* us. */
if (!shm_buffer)
return;
data = wl_shm_buffer_get_data(shm_buffer);
stride = buffer->stride;
height = buffer->height;
......
......@@ -265,7 +265,7 @@ output_run(uint32_t *p, uint32_t delta, int run)
#if defined(HAVE_BUILTIN_CLZ)
i = 24 - __builtin_clz(run);
#else
for (i = 0, tmp = u >> 8; tmp; i++, tmp >>= 1);
for (i = 0, tmp = run >> 8; tmp; i++, tmp >>= 1);
#endif
*p++ = delta | ((i + 0xe0) << 24);
run -= 1 << (7 + i);
......
......@@ -74,7 +74,7 @@ lib_lcms_util = static_library(
[ 'lcms_util.c' ],
include_directories: common_inc,
dependencies: [
dep_lcms2, dep_libm
dep_lcms2, dep_libm, dep_wayland_server
],
build_by_default: false,
install: false,
......