Compare commits

...

9 Commits
main ... 14.0

Author SHA1 Message Date
Marius Vlad
61f2248de2 build: bump to version 14.0.1 for the point release
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-10-21 16:22:27 +03:00
Marius Vlad
7eaba52a22 libweston/matrix: Fix narrow conversion with C++
Fixes the following C++ narrow conversion:

/include/libweston-14/libweston/matrix.h: In function ‘weston_coord
weston_coord_truncate(weston_coord)’:
/include/libweston-14/libweston/matrix.h:212:39: error: narrowing
conversion of ‘(int)in.weston_coord::x’ from ‘int’ to ‘double’
[-Werror=narrowing] 212 |         return (struct weston_coord){
	(int)in.x, (int)in.y };
      |                                       ^~~~~~~~~
/home/mvlad/install-new/include/libweston-14/libweston/matrix.h:212:50:
error: narrowing conversion of ‘(int)in.weston_coord::y’ from ‘int’ to
‘double’ [-Werror=narrowing] 212 |         return (struct weston_coord){
	(int)in.x, (int)in.y };

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
(cherry picked from commit a501acd291)
2024-10-21 13:41:04 +03:00
Jeri Li
502e4bd31d libweston/desktop: avoid weston crash while xdg_surface ack_configure
checks the resource and sends a protocol error if the client tries to
send a request to an inert object then returns out of the request
handler

Signed-off-by: Jeri Li <jeri.li@mediatek.com>
(cherry picked from commit 04f27f1be2)
2024-10-14 14:26:34 +03:00
Marius Vlad
e056153bf4 desktop-shell: Don't attempt to re-add the view to panel layer
This change fixes a side-effect of weston_view_move_to_layer helper
which would basically unmap the view because the layer entry list is no
longer visible. Only add the view to panel layer the first time.

Fixes: #956

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
(cherry picked from commit 217fb30847)
2024-10-11 13:30:52 +03:00
Marius Vlad
6d015b4759 libweston: Move weston_get_backend_type after enum declaration
Fix: #951

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
(cherry picked from commit 68bbc4cf51)
2024-10-11 13:30:13 +03:00
Jan Engelhardt
ca3c5b8015 build: insert missing wayland-server-protocol dependency
A new build error sprung up in weston-14 compared to 13.0.0.
Fix it.

FAILED: tests/liblib_lcms_util.a.p/lcms_util.c.o
cc -Itests/liblib_lcms_util.a.p -Itests -I../tests -I. -I.. -Iinclude
-I../include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -Wextra -Wpedantic -std=gnu99 -Wmissing-prototypes
-Wno-unused-parameter -Wno-shift-negative-value
-Wno-missing-field-initializers -Wno-pedantic -Wundef
-fvisibility=hidden -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables
-fstack-clash-protection -Werror=return-type -flto=auto -g -fPIC -MD
-MQ tests/liblib_lcms_util.a.p/lcms_util.c.o -MF
tests/liblib_lcms_util.a.p/lcms_util.c.o.d -o
tests/liblib_lcms_util.a.p/lcms_util.c.o -c ../tests/lcms_util.c
In file included from ../tests/lcms_util.c:35:
../include/libweston/matrix.h:33:10: fatal error:
wayland-server-protocol.h: No such file or directory

   33 | #include <wayland-server-protocol.h>

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
(cherry picked from commit f86ff8c07d)
2024-10-11 13:30:07 +03:00
David Edmundson
1e667cf0c3 libweston: Send seat name before announcing devices
Clients need to know the seat name at the time they create mouse and
keyboard objects. This brings Weston in line with other compositors.

The documentation upstream currently is not super clear. It states name
is explicitly sent on bind, capabilities don't mention being sent on
bind in any way.

Signed-off-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit fe64eee3ae)
2024-10-11 13:30:01 +03:00
EatingSumo
efd6789934 libweston/screenshooter: Fix build when __builtin_clz is not available
Fix compilation error when `__builtin_clz` is not available by renaming variable 'u' to 'run'

Signed-off-by: Junyu Long <877730493@qq.com>
(cherry picked from commit 312c8bea66)
2024-10-11 13:29:51 +03:00
Jan Alexander Steffens (heftig)
32f5596178 libweston/noop-renderer: Check shm_buffer for NULL
Copy the check from the pixman renderer.

Fixes: https://gitlab.freedesktop.org/wayland/weston/-/issues/953
Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
(cherry picked from commit 0e451e8dc3)
2024-10-11 13:28:48 +03:00
10 changed files with 34 additions and 10 deletions

View File

@ -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

View File

@ -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 *

View File

@ -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))

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -1,6 +1,6 @@
project('weston',
'c',
version: '14.0.0',
version: '14.0.1',
default_options: [
'warning_level=3',
'c_std=gnu99',

View File

@ -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,