[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/wayland/weston][debian-unstable] 13 commits: libweston/noop-renderer: Check shm_buffer for NULL



Title: GitLab

Dylan Aïssi pushed to branch debian-unstable at X Strike Force / wayland / weston

Commits:

  • 32f55961
    by Jan Alexander Steffens (heftig) at 2024-10-11T13:28:48+03:00
    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 0e451e8dc38b1539e6e2b0ae6f5c871d3edab70a)
    
  • efd67899
    by EatingSumo at 2024-10-11T13:29:51+03:00
    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 312c8bea660744efd0ff21acb19925d1e8321dd4)
    
  • 1e667cf0
    by David Edmundson at 2024-10-11T13:30:01+03:00
    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 fe64eee3aec200c465dfe0428e8a68d9c5711f39)
    
  • ca3c5b80
    by Jan Engelhardt at 2024-10-11T13:30:07+03:00
    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 f86ff8c07d9951672cee089ad626eb0898815bf0)
    
  • 6d015b47
    by Marius Vlad at 2024-10-11T13:30:13+03:00
    libweston: Move weston_get_backend_type after enum declaration
    
    Fix: #951
    
    Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
    (cherry picked from commit 68bbc4cf51291f4ea6770d710555a46729eed8e5)
    
  • e056153b
    by Marius Vlad at 2024-10-11T13:30:52+03:00
    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 217fb308471b16f43e2945c4bcfe17c3b98980fe)
    
  • 502e4bd3
    by Jeri Li at 2024-10-14T14:26:34+03:00
    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 04f27f1be2e0dd4526d994c27f6117634a51cc1d)
    
  • 7eaba52a
    by Marius Vlad at 2024-10-21T13:41:04+03:00
    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 a501acd291e819d00ef744ac6cd8b25500b07c3c)
    
  • 61f2248d
    by Marius Vlad at 2024-10-21T16:22:27+03:00
    build: bump to version 14.0.1 for the point release
    
    Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
    
  • 9d2cefb6
    by Dylan Aïssi at 2024-10-22T17:28:38+02:00
    Merge tag '14.0.1' into upstream-unstable
    
    14.0.1
    
  • f087105a
    by Dylan Aïssi at 2024-10-22T17:29:20+02:00
    Merge branch 'upstream-unstable' into debian-unstable
    
  • 20566eff
    by Dylan Aïssi at 2024-10-22T17:30:55+02:00
    Bump debian/changelog
    
    Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
    
  • 4ea68bf9
    by Dylan Aïssi at 2024-10-22T17:33:37+02:00
    Drop libweston-noop-renderer-Check-shm_buffer-for-NULL.patch, included in upstream release
    
    Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
    

13 changed files:

Changes:

  • debian/changelog
    1
    +weston (14.0.1-1) UNRELEASED; urgency=medium
    
    2
    +
    
    3
    +  * New upstream release.
    
    4
    +  * Update Homepage
    
    5
    +  * Drop libweston-noop-renderer-Check-shm_buffer-for-NULL.patch,
    
    6
    +      included in upstream release.
    
    7
    +
    
    8
    + -- Dylan Aïssi <daissi@debian.org>  Tue, 22 Oct 2024 17:30:05 +0200
    
    9
    +
    
    1 10
     weston (14.0.0-3) experimental; urgency=medium
    
    2 11
     
    
    3 12
       * Enable tests (build time and autopkgtest) on armhf since
    

  • debian/patches/libweston-noop-renderer-Check-shm_buffer-for-NULL.patch deleted
    1
    -From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
    
    2
    -Date: Sat, 14 Sep 2024 06:35:09 +0200
    
    3
    -Subject: libweston/noop-renderer: Check shm_buffer for NULL
    
    4
    -
    
    5
    -Copy the check from the pixman renderer.
    
    6
    -
    
    7
    -Bug: https://gitlab.freedesktop.org/wayland/weston/-/issues/953
    
    8
    -Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
    
    9
    -Forwarded: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1614
    
    10
    -Bug-Debian: https://bugs.debian.org/1081515
    
    11
    ----
    
    12
    - libweston/noop-renderer.c | 6 ++++++
    
    13
    - 1 file changed, 6 insertions(+)
    
    14
    -
    
    15
    -diff --git a/libweston/noop-renderer.c b/libweston/noop-renderer.c
    
    16
    -index 06b4aeb..58d0b66 100644
    
    17
    ---- a/libweston/noop-renderer.c
    
    18
    -+++ b/libweston/noop-renderer.c
    
    19
    -@@ -94,6 +94,12 @@ noop_renderer_attach(struct weston_paint_node *pnode)
    
    20
    - 	}
    
    21
    - 
    
    22
    - 	shm_buffer = buffer->shm_buffer;
    
    23
    -+	/* This can happen if a SHM wl_buffer gets destroyed before we attach,
    
    24
    -+	 * because wayland-server just nukes the wl_shm_buffer from underneath
    
    25
    -+	 * us. */
    
    26
    -+	if (!shm_buffer)
    
    27
    -+		return;
    
    28
    -+
    
    29
    - 	data = "">
    
    30
    - 	stride = buffer->stride;
    
    31
    - 	height = buffer->height;

  • debian/patches/series
    1 1
     Skip_xwayland_test.patch
    2
    -libweston-noop-renderer-Check-shm_buffer-for-NULL.patch

  • desktop-shell/shell.c
    ... ... @@ -2895,13 +2895,14 @@ panel_committed(struct weston_surface *es,
    2895 2895
     		weston_surface_map(es);
    
    2896 2896
     		assert(wl_list_empty(&es->views));
    
    2897 2897
     		sh_output->panel_view = weston_view_create(es);
    
    2898
    +
    
    2899
    +		weston_view_move_to_layer(sh_output->panel_view,
    
    2900
    +					  &shell->panel_layer.view_list);
    
    2898 2901
     	}
    
    2899 2902
     
    
    2900 2903
     	assert(sh_output->panel_view);
    
    2901 2904
     	pos = weston_coord_global_add(output->pos, sh_output->panel_offset);
    
    2902 2905
     	weston_view_set_position(sh_output->panel_view, pos);
    
    2903
    -	weston_view_move_to_layer(sh_output->panel_view,
    
    2904
    -				  &shell->panel_layer.view_list);
    
    2905 2906
     }
    
    2906 2907
     
    
    2907 2908
     static void
    

  • include/libweston/libweston.h
    ... ... @@ -2217,8 +2217,6 @@ void
    2217 2217
     weston_output_schedule_repaint_reset(struct weston_output *output);
    
    2218 2218
     void
    
    2219 2219
     weston_output_schedule_repaint_restart(struct weston_output *output);
    
    2220
    -enum weston_compositor_backend
    
    2221
    -weston_get_backend_type(struct weston_backend *backend);
    
    2222 2220
     void
    
    2223 2221
     weston_compositor_schedule_repaint(struct weston_compositor *compositor);
    
    2224 2222
     void
    
    ... ... @@ -2475,6 +2473,8 @@ struct weston_backend *
    2475 2473
     weston_compositor_load_backend(struct weston_compositor *compositor,
    
    2476 2474
     			       enum weston_compositor_backend backend,
    
    2477 2475
     			       struct weston_backend_config *config_base);
    
    2476
    +enum weston_compositor_backend
    
    2477
    +weston_get_backend_type(struct weston_backend *backend);
    
    2478 2478
     void
    
    2479 2479
     weston_compositor_exit(struct weston_compositor *ec);
    
    2480 2480
     void *
    

  • include/libweston/matrix.h
    ... ... @@ -209,7 +209,7 @@ weston_coord_surface_sub(struct weston_coord_surface a,
    209 209
     static inline struct weston_coord __attribute__ ((warn_unused_result))
    
    210 210
     weston_coord_truncate(struct weston_coord in)
    
    211 211
     {
    
    212
    -	return (struct weston_coord){ (int)in.x, (int)in.y };
    
    212
    +	return (struct weston_coord){ (double)(int) in.x, (double)(int) in.y };
    
    213 213
     }
    
    214 214
     
    
    215 215
     static inline struct weston_coord_surface __attribute__ ((warn_unused_result))
    

  • libweston/desktop/xdg-shell-v6.c
    ... ... @@ -1200,6 +1200,14 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client,
    1200 1200
     {
    
    1201 1201
     	struct weston_desktop_surface *dsurface =
    
    1202 1202
     		wl_resource_get_user_data(resource);
    
    1203
    +	if (dsurface == NULL) {
    
    1204
    +		wl_resource_post_error(resource,
    
    1205
    +				       ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED,
    
    1206
    +				      "xdg surface already destroyed configure "
    
    1207
    +				      "serial: %u", serial);
    
    1208
    +		return;
    
    1209
    +	}
    
    1210
    +
    
    1203 1211
     	struct weston_desktop_xdg_surface *surface =
    
    1204 1212
     		weston_desktop_surface_get_implementation_data(dsurface);
    
    1205 1213
     	struct weston_desktop_xdg_surface_configure *configure, *temp;
    

  • libweston/desktop/xdg-shell.c
    ... ... @@ -1414,6 +1414,14 @@ weston_desktop_xdg_surface_protocol_ack_configure(struct wl_client *wl_client,
    1414 1414
     {
    
    1415 1415
     	struct weston_desktop_surface *dsurface =
    
    1416 1416
     		wl_resource_get_user_data(resource);
    
    1417
    +	if (dsurface == NULL) {
    
    1418
    +		wl_resource_post_error(resource,
    
    1419
    +				       XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT,
    
    1420
    +				       "xdg surface already destroyed configure "
    
    1421
    +				       "serial: %u", serial);
    
    1422
    +		return;
    
    1423
    +	}
    
    1424
    +
    
    1417 1425
     	struct weston_desktop_xdg_surface *surface =
    
    1418 1426
     		weston_desktop_surface_get_implementation_data(dsurface);
    
    1419 1427
     	struct weston_desktop_xdg_surface_configure *configure, *temp;
    

  • libweston/input.c
    ... ... @@ -3848,6 +3848,9 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
    3848 3848
     	wl_resource_set_implementation(resource, &seat_interface, data,
    
    3849 3849
     				       unbind_resource);
    
    3850 3850
     
    
    3851
    +	if (version >= WL_SEAT_NAME_SINCE_VERSION)
    
    3852
    +		wl_seat_send_name(resource, seat->seat_name);
    
    3853
    +
    
    3851 3854
     	if (weston_seat_get_pointer(seat))
    
    3852 3855
     		caps |= WL_SEAT_CAPABILITY_POINTER;
    
    3853 3856
     	if (weston_seat_get_keyboard(seat))
    
    ... ... @@ -3856,8 +3859,6 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
    3856 3859
     		caps |= WL_SEAT_CAPABILITY_TOUCH;
    
    3857 3860
     
    
    3858 3861
     	wl_seat_send_capabilities(resource, caps);
    
    3859
    -	if (version >= WL_SEAT_NAME_SINCE_VERSION)
    
    3860
    -		wl_seat_send_name(resource, seat->seat_name);
    
    3861 3862
     }
    
    3862 3863
     
    
    3863 3864
     static void
    

  • libweston/noop-renderer.c
    ... ... @@ -94,6 +94,12 @@ noop_renderer_attach(struct weston_paint_node *pnode)
    94 94
     	}
    
    95 95
     
    
    96 96
     	shm_buffer = buffer->shm_buffer;
    
    97
    +	/* This can happen if a SHM wl_buffer gets destroyed before we attach,
    
    98
    +	 * because wayland-server just nukes the wl_shm_buffer from underneath
    
    99
    +	 * us. */
    
    100
    +	if (!shm_buffer)
    
    101
    +		return;
    
    102
    +
    
    97 103
     	data = wl_shm_buffer_get_data(shm_buffer);
    
    98 104
     	stride = buffer->stride;
    
    99 105
     	height = buffer->height;
    

  • libweston/screenshooter.c
    ... ... @@ -265,7 +265,7 @@ output_run(uint32_t *p, uint32_t delta, int run)
    265 265
     #if defined(HAVE_BUILTIN_CLZ)
    
    266 266
     		i = 24 - __builtin_clz(run);
    
    267 267
     #else
    
    268
    -		for (i = 0, tmp = u >> 8; tmp; i++, tmp >>= 1);
    
    268
    +		for (i = 0, tmp = run >> 8; tmp; i++, tmp >>= 1);
    
    269 269
     #endif
    
    270 270
     		*p++ = delta | ((i + 0xe0) << 24);
    
    271 271
     		run -= 1 << (7 + i);
    

  • meson.build
    1 1
     project('weston',
    
    2 2
     	'c',
    
    3
    -	version: '14.0.0',
    
    3
    +	version: '14.0.1',
    
    4 4
     	default_options: [
    
    5 5
     		'warning_level=3',
    
    6 6
     		'c_std=gnu99',
    

  • tests/meson.build
    ... ... @@ -74,7 +74,7 @@ lib_lcms_util = static_library(
    74 74
     	[ 'lcms_util.c' ],
    
    75 75
     	include_directories: common_inc,
    
    76 76
     	dependencies: [
    
    77
    -		dep_lcms2, dep_libm
    
    77
    +		dep_lcms2, dep_libm, dep_wayland_server
    
    78 78
     	],
    
    79 79
     	build_by_default: false,
    
    80 80
     	install: false,
    


  • Reply to: