Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package weston for openSUSE:Factory checked 
in at 2024-04-25 20:50:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/weston (Old)
 and      /work/SRC/openSUSE:Factory/.weston.new.1880 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "weston"

Thu Apr 25 20:50:20 2024 rev:34 rq:1169919 version:13.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/weston/weston.changes    2023-12-05 
17:03:24.317565759 +0100
+++ /work/SRC/openSUSE:Factory/.weston.new.1880/weston.changes  2024-04-25 
20:50:49.869694563 +0200
@@ -1,0 +2,8 @@
+Tue Apr 23 16:25:21 UTC 2024 - Jan Engelhardt <[email protected]>
+
+- Update to release 13.0.1
+  * desktop-shell: clamp view alpha correctly
+  * desktop-shell: set proper curtain size when no output is
+    created yet
+
+-------------------------------------------------------------------

Old:
----
  weston-13.0.0.tar.xz
  weston-13.0.0.tar.xz.sig

New:
----
  weston-13.0.1.tar.xz
  weston-13.0.1.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ weston.spec ++++++
--- /var/tmp/diff_new_pack.dhHfc8/_old  2024-04-25 20:50:50.441715339 +0200
+++ /var/tmp/diff_new_pack.dhHfc8/_new  2024-04-25 20:50:50.445715484 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package weston
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 Name:           weston
 %define lname  libweston0
 %define major   13
-Version:        13.0.0
+Version:        13.0.1
 Release:        0
 Summary:        Wayland Reference Compositor
 License:        CC-BY-SA-3.0 AND MIT
@@ -27,8 +27,8 @@
 URL:            https://wayland.freedesktop.org/
 #Git-Clone:    git://anongit.freedesktop.org/wayland/weston
 #Git-Web:      https://cgit.freedesktop.org/wayland/weston/
-Source:         
https://gitlab.freedesktop.org/wayland/weston/-/releases/%version/downloads/weston-%version.tar.xz
-Source2:        
https://gitlab.freedesktop.org/wayland/weston/-/releases/%version/downloads/weston-%version.tar.xz.sig
+Source:         
https://gitlab.freedesktop.org/wayland/weston/-/releases/%version/downloads/%name-%version.tar.xz
+Source2:        
https://gitlab.freedesktop.org/wayland/weston/-/releases/%version/downloads/%name-%version.tar.xz.sig
 BuildRequires:  Mesa-libGLESv3-devel
 BuildRequires:  gcc-c++
 BuildRequires:  glibc-devel >= 2.27
@@ -123,6 +123,7 @@
 %autosetup -p1
 
 %build
+# includedir intentional, cf. bugzilla.opensuse.org/795968
 %meson -Ddemo-clients=false -Dremoting=false -Dsimple-clients= \
        -Dtest-junit-xml=false -Dpipewire=false -Dbackend-vnc=false \
        --includedir="%_includedir/%name"
@@ -145,8 +146,7 @@
 popd
 %endif
 
-%post   -n libweston-%major-0 -p /sbin/ldconfig
-%postun -n libweston-%major-0 -p /sbin/ldconfig
+%ldconfig_scriptlets -n libweston-%major-0
 
 %files
 %license COPYING

++++++ weston-13.0.0.tar.xz -> weston-13.0.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/clients/desktop-shell.c 
new/weston-13.0.1/clients/desktop-shell.c
--- old/weston-13.0.0/clients/desktop-shell.c   2023-11-27 19:01:53.000000000 
+0100
+++ new/weston-13.0.1/clients/desktop-shell.c   2024-04-23 17:26:12.000000000 
+0200
@@ -1586,7 +1586,7 @@
        if (desktop.want_panel)
                weston_desktop_shell_set_panel_position(desktop.shell, 
desktop.panel_position);
        wl_list_for_each(output, &desktop.outputs, link)
-               if (!output->panel)
+               if (!output->background)
                        output_init(output, &desktop);
 
        grab_surface_create(&desktop);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/desktop-shell/shell.c 
new/weston-13.0.1/desktop-shell/shell.c
--- old/weston-13.0.0/desktop-shell/shell.c     2023-11-27 19:01:53.000000000 
+0100
+++ new/weston-13.0.1/desktop-shell/shell.c     2024-04-23 17:26:12.000000000 
+0200
@@ -272,11 +272,10 @@
                        width = shsurf->output->width;
                        height = shsurf->output->height;
                }
-       }
-
-       /* take the panels into considerations */
-       if (max_requested)
+       } else if (max_requested) {
+               /* take the panels into considerations */
                get_maximized_size(shsurf, &width, &height);
+       }
 
        /* (0, 0) means we're back from one of the maximized/fullcreen states */
        weston_desktop_surface_set_size(shsurf->desktop_surface, width, height);
@@ -3351,10 +3350,7 @@
                return;
 
        alpha = shsurf->view->alpha - (event->value * step);
-       if (shsurf->view->alpha > 1.0)
-               shsurf->view->alpha = 1.0;
-       if (shsurf->view->alpha < step)
-               shsurf->view->alpha = step;
+       alpha = CLIP(alpha, step, 1.0);
 
        weston_view_set_alpha(shsurf->view, alpha);
 }
@@ -3846,7 +3842,7 @@
        };
        struct weston_curtain *curtain;
        bool first = true;
-       int x1, y1, x2, y2;
+       int x1 = 0, y1 = 0, x2 = 0, y2 = 0;
 
        wl_list_for_each(shell_output, &shell->output_list, link) {
                struct weston_output *op = shell_output->output;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/include/libweston/libweston.h 
new/weston-13.0.1/include/libweston/libweston.h
--- old/weston-13.0.0/include/libweston/libweston.h     2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/include/libweston/libweston.h     2024-04-23 
17:26:12.000000000 +0200
@@ -548,7 +548,7 @@
        struct weston_log_pacer pixman_overdraw_pacer;
 
        int (*start_repaint_loop)(struct weston_output *output);
-       int (*repaint)(struct weston_output *output, pixman_region32_t *damage);
+       int (*repaint)(struct weston_output *output);
        void (*destroy)(struct weston_output *output);
        void (*assign_planes)(struct weston_output *output);
        int (*switch_mode)(struct weston_output *output, struct weston_mode 
*mode);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/ivi-shell/ivi-shell.c 
new/weston-13.0.1/ivi-shell/ivi-shell.c
--- old/weston-13.0.0/ivi-shell/ivi-shell.c     2023-11-27 19:01:53.000000000 
+0100
+++ new/weston-13.0.1/ivi-shell/ivi-shell.c     2024-04-23 17:26:12.000000000 
+0200
@@ -220,12 +220,19 @@
 static void
 layout_surface_cleanup(struct ivi_shell_surface *ivisurf)
 {
+       struct weston_seat *seat;
        assert(ivisurf->layout_surface != NULL);
 
        /* destroy weston_surface destroy signal. */
        if (!ivisurf->layout_surface->weston_desktop_surface)
                wl_list_remove(&ivisurf->surface_destroy_listener.link);
 
+       wl_list_for_each(seat, &ivisurf->surface->compositor->seat_list, link) {
+               struct ivi_shell_seat *shseat = get_ivi_shell_seat(seat);
+               if (shseat->focused_ivisurf == ivisurf->layout_surface)
+                       shseat->focused_ivisurf = NULL;
+       }
+
        ivi_layout_surface_destroy(ivisurf->layout_surface);
        ivisurf->layout_surface = NULL;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-drm/drm-gbm.c 
new/weston-13.0.1/libweston/backend-drm/drm-gbm.c
--- old/weston-13.0.0/libweston/backend-drm/drm-gbm.c   2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-drm/drm-gbm.c   2024-04-23 
17:26:12.000000000 +0200
@@ -82,18 +82,17 @@
        const struct pixel_format_info *format[3] = {
                b->format,
                fallback_format_for(b->format),
-               NULL,
        };
        struct gl_renderer_display_options options = {
                .egl_platform = EGL_PLATFORM_GBM_KHR,
                .egl_native_display = b->gbm,
                .egl_surface_type = EGL_WINDOW_BIT,
                .formats = format,
-               .formats_count = 2,
+               .formats_count = 1,
        };
 
        if (format[1])
-               options.formats_count = 3;
+               options.formats_count = 2;
 
        return weston_compositor_init_renderer(b->compositor,
                                               WESTON_RENDERER_GL,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-drm/drm-internal.h 
new/weston-13.0.1/libweston/backend-drm/drm-internal.h
--- old/weston-13.0.0/libweston/backend-drm/drm-internal.h      2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-drm/drm-internal.h      2024-04-23 
17:26:12.000000000 +0200
@@ -965,7 +965,7 @@
 drm_plane_is_available(struct drm_plane *plane, struct drm_output *output);
 
 void
-drm_output_render(struct drm_output_state *state, pixman_region32_t *damage);
+drm_output_render(struct drm_output_state *state);
 
 int
 parse_gbm_format(const char *s, const struct pixel_format_info *default_format,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-drm/drm-virtual.c 
new/weston-13.0.1/libweston/backend-drm/drm-virtual.c
--- old/weston-13.0.0/libweston/backend-drm/drm-virtual.c       2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-drm/drm-virtual.c       2024-04-23 
17:26:12.000000000 +0200
@@ -202,8 +202,7 @@
 }
 
 static int
-drm_virtual_output_repaint(struct weston_output *output_base,
-                          pixman_region32_t *damage)
+drm_virtual_output_repaint(struct weston_output *output_base)
 {
        struct drm_output_state *state = NULL;
        struct drm_output *output = to_drm_output(output_base);
@@ -237,7 +236,7 @@
                                                   pending_state,
                                                   
DRM_OUTPUT_STATE_CLEAR_PLANES);
 
-       drm_output_render(state, damage);
+       drm_output_render(state);
        scanout_state = drm_output_state_get_plane(state, scanout_plane);
        if (!scanout_state || !scanout_state->fb)
                goto err;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-drm/drm.c 
new/weston-13.0.1/libweston/backend-drm/drm.c
--- old/weston-13.0.0/libweston/backend-drm/drm.c       2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-drm/drm.c       2024-04-23 
17:26:12.000000000 +0200
@@ -75,56 +75,78 @@
 drm_backend_create_faked_zpos(struct drm_device *device)
 {
        struct drm_backend *b = device->backend;
-       struct drm_plane *plane;
+       struct drm_plane *plane, *tmp;
+       struct wl_list tmp_list;
        uint64_t zpos = 0ULL;
        uint64_t zpos_min_primary;
        uint64_t zpos_min_overlay;
        uint64_t zpos_min_cursor;
 
-       zpos_min_primary = zpos;
+       /* if the property is there, bail out sooner */
        wl_list_for_each(plane, &device->plane_list, link) {
-               /* if the property is there, bail out sooner */
                if (plane->props[WDRM_PLANE_ZPOS].prop_id != 0)
                        return;
+       }
+
+       drm_debug(b, "[drm-backend] zpos property not found. "
+                    "Using invented immutable zpos values:\n");
+
+       wl_list_init(&tmp_list);
+       wl_list_insert_list(&tmp_list, &device->plane_list);
+       wl_list_init(&device->plane_list);
 
+       zpos_min_primary = zpos;
+       wl_list_for_each_safe(plane, tmp, &tmp_list, link) {
                if (plane->type != WDRM_PLANE_TYPE_PRIMARY)
                        continue;
+
+               plane->zpos_min = zpos_min_primary;
+               plane->zpos_max = zpos_min_primary;
+               wl_list_remove(&plane->link);
+               wl_list_insert(&device->plane_list, &plane->link);
                zpos++;
+
+               drm_debug(b, "\t[plane] %s plane %d, zpos_min %"PRIu64", "
+                             "zpos_max %"PRIu64"\n",
+                             drm_output_get_plane_type_name(plane),
+                             plane->plane_id, plane->zpos_min, 
plane->zpos_max);
        }
 
        zpos_min_overlay = zpos;
-       wl_list_for_each(plane, &device->plane_list, link) {
+       wl_list_for_each_safe(plane, tmp, &tmp_list, link) {
                if (plane->type != WDRM_PLANE_TYPE_OVERLAY)
                        continue;
+
+               plane->zpos_min = zpos_min_overlay;
+               plane->zpos_max = zpos_min_overlay;
+               wl_list_remove(&plane->link);
+               wl_list_insert(&device->plane_list, &plane->link);
                zpos++;
+
+               drm_debug(b, "\t[plane] %s plane %d, zpos_min %"PRIu64", "
+                             "zpos_max %"PRIu64"\n",
+                             drm_output_get_plane_type_name(plane),
+                             plane->plane_id, plane->zpos_min, 
plane->zpos_max);
        }
 
        zpos_min_cursor = zpos;
-       wl_list_for_each(plane, &device->plane_list, link) {
+       wl_list_for_each_safe(plane, tmp, &tmp_list, link) {
                if (plane->type != WDRM_PLANE_TYPE_CURSOR)
                        continue;
+
+               plane->zpos_min = zpos_min_cursor;
+               plane->zpos_max = zpos_min_cursor;
+               wl_list_remove(&plane->link);
+               wl_list_insert(&device->plane_list, &plane->link);
                zpos++;
-       }
 
-       drm_debug(b, "[drm-backend] zpos property not found. "
-                    "Using invented immutable zpos values:\n");
-       /* assume that invented zpos values are immutable */
-       wl_list_for_each(plane, &device->plane_list, link) {
-               if (plane->type == WDRM_PLANE_TYPE_PRIMARY) {
-                       plane->zpos_min = zpos_min_primary;
-                       plane->zpos_max = zpos_min_primary;
-               } else if (plane->type == WDRM_PLANE_TYPE_OVERLAY) {
-                       plane->zpos_min = zpos_min_overlay;
-                       plane->zpos_max = zpos_min_overlay;
-               } else if (plane->type == WDRM_PLANE_TYPE_CURSOR) {
-                       plane->zpos_min = zpos_min_cursor;
-                       plane->zpos_max = zpos_min_cursor;
-               }
                drm_debug(b, "\t[plane] %s plane %d, zpos_min %"PRIu64", "
                              "zpos_max %"PRIu64"\n",
                              drm_output_get_plane_type_name(plane),
                              plane->plane_id, plane->zpos_min, 
plane->zpos_max);
        }
+
+       assert(wl_list_empty(&tmp_list));
 }
 
 static int
@@ -355,7 +377,7 @@
 }
 
 void
-drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
+drm_output_render(struct drm_output_state *state)
 {
        struct drm_output *output = state->output;
        struct drm_device *device = output->device;
@@ -365,7 +387,7 @@
        struct drm_property_info *damage_info =
                &scanout_plane->props[WDRM_PLANE_FB_DAMAGE_CLIPS];
        struct drm_fb *fb;
-       pixman_region32_t scanout_damage;
+       pixman_region32_t damage, scanout_damage;
        pixman_box32_t *rects;
        int n_rects;
 
@@ -375,6 +397,10 @@
        if (scanout_state->fb)
                return;
 
+       pixman_region32_init(&damage);
+
+       weston_output_flush_damage_for_primary_plane(&output->base, &damage);
+
        /*
         * If we don't have any damage on the primary plane, and we already
         * have a renderer buffer active, we can reuse it; else we pass
@@ -382,7 +408,7 @@
         * area. But, we still have to call the renderer anyway if any screen
         * capture is pending, otherwise the capture will not complete.
         */
-       if (!pixman_region32_not_empty(damage) &&
+       if (!pixman_region32_not_empty(&damage) &&
            wl_list_empty(&output->base.frame_signal.listener_list) &&
            !weston_output_has_renderer_capture_tasks(&output->base) &&
            scanout_plane->state_cur->fb &&
@@ -390,14 +416,14 @@
             scanout_plane->state_cur->fb->type == BUFFER_PIXMAN_DUMB)) {
                fb = drm_fb_ref(scanout_plane->state_cur->fb);
        } else if (c->renderer->type == WESTON_RENDERER_PIXMAN) {
-               fb = drm_output_render_pixman(state, damage);
+               fb = drm_output_render_pixman(state, &damage);
        } else {
-               fb = drm_output_render_gl(state, damage);
+               fb = drm_output_render_gl(state, &damage);
        }
 
        if (!fb) {
                drm_plane_state_put_back(scanout_state);
-               return;
+               goto out;
        }
 
        scanout_state->fb = fb;
@@ -417,13 +443,13 @@
 
        /* Don't bother calculating plane damage if the plane doesn't support 
it */
        if (damage_info->prop_id == 0)
-               return;
+               goto out;
 
        pixman_region32_init(&scanout_damage);
 
        weston_region_global_to_output(&scanout_damage,
                                       &output->base,
-                                      damage);
+                                      &damage);
 
        assert(scanout_state->damage_blob_id == 0);
 
@@ -440,6 +466,8 @@
                                  &scanout_state->damage_blob_id);
 
        pixman_region32_fini(&scanout_damage);
+out:
+       pixman_region32_fini(&damage);
 }
 
 static uint32_t
@@ -651,7 +679,7 @@
 #endif
 
 static int
-drm_output_repaint(struct weston_output *output_base, pixman_region32_t 
*damage)
+drm_output_repaint(struct weston_output *output_base)
 {
        struct drm_output *output = to_drm_output(output_base);
        struct drm_output_state *state = NULL;
@@ -718,7 +746,7 @@
        if (device->atomic_modeset)
                drm_output_pick_writeback_capture_task(output);
 
-       drm_output_render(state, damage);
+       drm_output_render(state);
        scanout_state = drm_output_state_get_plane(state,
                                                   output->scanout_plane);
        if (!scanout_state || !scanout_state->fb)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-drm/state-propose.c 
new/weston-13.0.1/libweston/backend-drm/state-propose.c
--- old/weston-13.0.0/libweston/backend-drm/state-propose.c     2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-drm/state-propose.c     2024-04-23 
17:26:12.000000000 +0200
@@ -508,6 +508,7 @@
                        /* if the view covers the whole output, put it in the
                         * scanout plane, not overlay */
                        if (view_matches_entire_output &&
+                           weston_view_is_opaque(ev, 
&ev->transform.boundingbox) &&
                            !scanout_has_view_assigned)
                                continue;
                        break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-headless/headless.c 
new/weston-13.0.1/libweston/backend-headless/headless.c
--- old/weston-13.0.0/libweston/backend-headless/headless.c     2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-headless/headless.c     2024-04-23 
17:26:12.000000000 +0200
@@ -152,11 +152,11 @@
 }
 
 static int
-headless_output_repaint(struct weston_output *output_base,
-                      pixman_region32_t *damage)
+headless_output_repaint(struct weston_output *output_base)
 {
        struct headless_output *output = to_headless_output(output_base);
        struct weston_compositor *ec;
+       pixman_region32_t damage;
 
        assert(output);
 
@@ -164,9 +164,15 @@
 
        headless_output_update_gl_border(output);
 
-       ec->renderer->repaint_output(&output->base, damage,
+       pixman_region32_init(&damage);
+
+       weston_output_flush_damage_for_primary_plane(output_base, &damage);
+
+       ec->renderer->repaint_output(&output->base, &damage,
                                     output->renderbuffer);
 
+       pixman_region32_fini(&damage);
+
        wl_event_source_timer_update(output->finish_frame_timer, 16);
 
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-pipewire/pipewire.c 
new/weston-13.0.1/libweston/backend-pipewire/pipewire.c
--- old/weston-13.0.0/libweston/backend-pipewire/pipewire.c     2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-pipewire/pipewire.c     2024-04-23 
17:26:12.000000000 +0200
@@ -725,19 +725,24 @@
 }
 
 static int
-pipewire_output_repaint(struct weston_output *base, pixman_region32_t *damage)
+pipewire_output_repaint(struct weston_output *base)
 {
        struct pipewire_output *output = to_pipewire_output(base);
        struct weston_compositor *ec = output->base.compositor;
        struct pw_buffer *buffer;
        struct pipewire_frame_data *frame_data;
+       pixman_region32_t damage;
 
        assert(output);
 
+       pixman_region32_init(&damage);
+
        if (pw_stream_get_state(output->stream, NULL) != 
PW_STREAM_STATE_STREAMING)
                goto out;
 
-       if (!pixman_region32_not_empty(damage))
+       weston_output_flush_damage_for_primary_plane(base, &damage);
+
+       if (!pixman_region32_not_empty(&damage))
                goto out;
 
        buffer = pw_stream_dequeue_buffer(output->stream);
@@ -748,12 +753,14 @@
        pipewire_output_debug(output, "dequeued buffer: %p", buffer);
 
        frame_data = buffer->user_data;
-       ec->renderer->repaint_output(&output->base, damage, 
frame_data->renderbuffer);
+       ec->renderer->repaint_output(&output->base, &damage, 
frame_data->renderbuffer);
 
        pipewire_submit_buffer(output, buffer);
 
 out:
 
+       pixman_region32_fini(&damage);
+
        weston_output_arm_frame_timer(base, output->finish_frame_timer);
 
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-rdp/rdp.c 
new/weston-13.0.1/libweston/backend-rdp/rdp.c
--- old/weston-13.0.0/libweston/backend-rdp/rdp.c       2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-rdp/rdp.c       2024-04-23 
17:26:12.000000000 +0200
@@ -272,24 +272,29 @@
 }
 
 static int
-rdp_output_repaint(struct weston_output *output_base, pixman_region32_t 
*damage)
+rdp_output_repaint(struct weston_output *output_base)
 {
        struct rdp_output *output = container_of(output_base, struct 
rdp_output, base);
        struct weston_compositor *ec = output->base.compositor;
        struct rdp_backend *b = output->backend;
        struct rdp_peers_item *peer;
+       pixman_region32_t damage;
 
        assert(output);
 
-       ec->renderer->repaint_output(&output->base, damage,
+       pixman_region32_init(&damage);
+
+       weston_output_flush_damage_for_primary_plane(output_base, &damage);
+
+       ec->renderer->repaint_output(&output->base, &damage,
                                     output->renderbuffer);
 
-       if (pixman_region32_not_empty(damage)) {
+       if (pixman_region32_not_empty(&damage)) {
                pixman_region32_t transformed_damage;
                pixman_region32_init(&transformed_damage);
                weston_region_global_to_output(&transformed_damage,
                                               output_base,
-                                              damage);
+                                              &damage);
                wl_list_for_each(peer, &b->peers, link) {
                        if ((peer->flags & RDP_PEER_ACTIVATED) &&
                            (peer->flags & RDP_PEER_OUTPUT_ENABLED)) {
@@ -299,6 +304,8 @@
                pixman_region32_fini(&transformed_damage);
        }
 
+       pixman_region32_fini(&damage);
+
        weston_output_arm_frame_timer(output_base, output->finish_frame_timer);
 
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-vnc/vnc.c 
new/weston-13.0.1/libweston/backend-vnc/vnc.c
--- old/weston-13.0.0/libweston/backend-vnc/vnc.c       2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-vnc/vnc.c       2024-04-23 
17:26:12.000000000 +0200
@@ -1004,10 +1004,11 @@
 }
 
 static int
-vnc_output_repaint(struct weston_output *base, pixman_region32_t *damage)
+vnc_output_repaint(struct weston_output *base)
 {
        struct vnc_output *output = to_vnc_output(base);
        struct vnc_backend *backend = output->backend;
+       pixman_region32_t damage;
 
        assert(output);
 
@@ -1016,10 +1017,16 @@
 
        vnc_output_update_cursor(output);
 
-       if (pixman_region32_not_empty(damage)) {
-               vnc_update_buffer(output->display, damage);
+       pixman_region32_init(&damage);
+
+       weston_output_flush_damage_for_primary_plane(base, &damage);
+
+       if (pixman_region32_not_empty(&damage)) {
+               vnc_update_buffer(output->display, &damage);
        }
 
+       pixman_region32_fini(&damage);
+
        /*
         * Make sure damage of this (or previous) damage is handled
         *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-wayland/wayland.c 
new/weston-13.0.1/libweston/backend-wayland/wayland.c
--- old/weston-13.0.0/libweston/backend-wayland/wayland.c       2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-wayland/wayland.c       2024-04-23 
17:26:12.000000000 +0200
@@ -498,22 +498,28 @@
 
 #ifdef ENABLE_EGL
 static int
-wayland_output_repaint_gl(struct weston_output *output_base,
-                         pixman_region32_t *damage)
+wayland_output_repaint_gl(struct weston_output *output_base)
 {
        struct wayland_output *output = to_wayland_output(output_base);
        struct weston_compositor *ec;
+       pixman_region32_t damage;
 
        assert(output);
 
        ec = output->base.compositor;
 
+       pixman_region32_init(&damage);
+
+       weston_output_flush_damage_for_primary_plane(output_base, &damage);
+
        output->frame_cb = wl_surface_frame(output->parent.surface);
        wl_callback_add_listener(output->frame_cb, &frame_listener, output);
 
        wayland_output_update_gl_border(output);
 
-       ec->renderer->repaint_output(&output->base, damage, NULL);
+       ec->renderer->repaint_output(&output->base, &damage, NULL);
+
+       pixman_region32_fini(&damage);
 
        return 0;
 }
@@ -604,17 +610,21 @@
 }
 
 static int
-wayland_output_repaint_pixman(struct weston_output *output_base,
-                             pixman_region32_t *damage)
+wayland_output_repaint_pixman(struct weston_output *output_base)
 {
        struct wayland_output *output = to_wayland_output(output_base);
        struct wayland_backend *b;
        struct wayland_shm_buffer *sb;
+       pixman_region32_t damage;
 
        assert(output);
 
        b = output->backend;
 
+       pixman_region32_init(&damage);
+
+       weston_output_flush_damage_for_primary_plane(output_base, &damage);
+
        if (output->frame) {
                if (frame_status(output->frame) & FRAME_STATUS_REPAINT)
                        wl_list_for_each(sb, &output->shm.buffers, link)
@@ -624,10 +634,12 @@
        sb = wayland_output_get_shm_buffer(output);
 
        wayland_output_update_shm_border(sb);
-       b->compositor->renderer->repaint_output(output_base, damage,
+       b->compositor->renderer->repaint_output(output_base, &damage,
                                                sb->renderbuffer);
 
-       wayland_shm_buffer_attach(sb, damage);
+       wayland_shm_buffer_attach(sb, &damage);
+
+       pixman_region32_fini(&damage);
 
        output->frame_cb = wl_surface_frame(output->parent.surface);
        wl_callback_add_listener(output->frame_cb, &frame_listener, output);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend-x11/x11.c 
new/weston-13.0.1/libweston/backend-x11/x11.c
--- old/weston-13.0.0/libweston/backend-x11/x11.c       2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/backend-x11/x11.c       2024-04-23 
17:26:12.000000000 +0200
@@ -429,17 +429,23 @@
 }
 
 static int
-x11_output_repaint_gl(struct weston_output *output_base,
-                     pixman_region32_t *damage)
+x11_output_repaint_gl(struct weston_output *output_base)
 {
        struct x11_output *output = to_x11_output(output_base);
        struct weston_compositor *ec;
+       pixman_region32_t damage;
 
        assert(output);
 
        ec = output->base.compositor;
 
-       ec->renderer->repaint_output(output_base, damage, NULL);
+       pixman_region32_init(&damage);
+
+       weston_output_flush_damage_for_primary_plane(output_base, &damage);
+
+       ec->renderer->repaint_output(output_base, &damage, NULL);
+
+       pixman_region32_fini(&damage);
 
        weston_output_arm_frame_timer(output_base, output->finish_frame_timer);
        return 0;
@@ -498,8 +504,7 @@
 
 
 static int
-x11_output_repaint_shm(struct weston_output *output_base,
-                      pixman_region32_t *damage)
+x11_output_repaint_shm(struct weston_output *output_base)
 {
        struct x11_output *output = to_x11_output(output_base);
        const struct weston_renderer *renderer;
@@ -508,6 +513,7 @@
        struct x11_backend *b;
        xcb_void_cookie_t cookie;
        xcb_generic_error_t *err;
+       pixman_region32_t damage;
 
        assert(output);
 
@@ -517,9 +523,16 @@
 
        image = renderer->pixman->renderbuffer_get_image(output->renderbuffer);
 
-       ec->renderer->repaint_output(output_base, damage, output->renderbuffer);
+       pixman_region32_init(&damage);
+
+       weston_output_flush_damage_for_primary_plane(output_base, &damage);
+
+       ec->renderer->repaint_output(output_base, &damage, 
output->renderbuffer);
+
+       set_clip_for_output(output_base, &damage);
+
+       pixman_region32_fini(&damage);
 
-       set_clip_for_output(output_base, damage);
        cookie = xcb_shm_put_image_checked(b->conn, output->window, output->gc,
                                        pixman_image_get_width(image),
                                        pixman_image_get_height(image),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/backend.h 
new/weston-13.0.1/libweston/backend.h
--- old/weston-13.0.0/libweston/backend.h       2023-11-27 19:01:53.000000000 
+0100
+++ new/weston-13.0.1/libweston/backend.h       2024-04-23 17:26:12.000000000 
+0200
@@ -327,4 +327,8 @@
                                     struct weston_plane *plane,
                                     pixman_region32_t *damage);
 
+void
+weston_output_flush_damage_for_primary_plane(struct weston_output *output,
+                                            pixman_region32_t *damage);
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/compositor.c 
new/weston-13.0.1/libweston/compositor.c
--- old/weston-13.0.0/libweston/compositor.c    2023-11-27 19:01:53.000000000 
+0100
+++ new/weston-13.0.1/libweston/compositor.c    2024-04-23 17:26:12.000000000 
+0200
@@ -3378,6 +3378,12 @@
                        continue;
                changed = true;
 
+               /* We can safely clip paint node damage to visible region
+                * here, as we're only dealing with nodes on this output,
+                * and the visibility regions for paint nodes on this
+                * output are up to date.
+                */
+               pixman_region32_intersect(&pnode->damage, &pnode->damage, 
&pnode->visible);
                pixman_region32_union(damage, damage, &pnode->damage);
                pixman_region32_clear(&pnode->damage);
        }
@@ -3385,6 +3391,20 @@
        return changed;
 }
 
+WL_EXPORT void
+weston_output_flush_damage_for_primary_plane(struct weston_output *output,
+                                            pixman_region32_t *damage)
+{
+       weston_output_flush_damage_for_plane(output,
+                                            &output->primary_plane,
+                                            damage);
+
+       if (output->full_repaint_needed) {
+               pixman_region32_copy(damage, &output->region);
+               output->full_repaint_needed = false;
+       }
+}
+
 static int
 weston_output_repaint(struct weston_output *output)
 {
@@ -3393,7 +3413,6 @@
        struct weston_animation *animation, *next;
        struct wl_resource *cb, *cnext;
        struct wl_list frame_callback_list;
-       pixman_region32_t output_damage;
        int r;
        uint32_t frame_time_msec;
        enum weston_hdcp_protection highest_requested = WESTON_HDCP_DISABLE;
@@ -3465,19 +3484,7 @@
 
        output_accumulate_damage(output);
 
-       pixman_region32_init(&output_damage);
-
-       weston_output_flush_damage_for_plane(output, &output->primary_plane,
-                                            &output_damage);
-
-       if (output->full_repaint_needed) {
-               pixman_region32_copy(&output_damage, &output->region);
-               output->full_repaint_needed = false;
-       }
-
-       r = output->repaint(output, &output_damage);
-
-       pixman_region32_fini(&output_damage);
+       r = output->repaint(output);
 
        output->repaint_needed = false;
        if (r == 0)
@@ -3844,17 +3851,10 @@
                          struct weston_layer_entry *layer)
 {
        bool was_mapped = view->is_mapped;
-       struct weston_paint_node *pnode, *pntmp;
 
        if (layer == &view->layer_link)
                return;
 
-       /* Remove all paint nodes because we have no idea what a layer change
-        * does to view visibility on any output.
-        */
-       wl_list_for_each_safe(pnode, pntmp, &view->paint_node_list, view_link)
-               weston_paint_node_destroy(pnode);
-
        view->surface->compositor->view_list_needs_rebuild = true;
 
        /* Damage the view's old region, and remove it from the layer. */
@@ -3884,6 +3884,18 @@
 WL_EXPORT void
 weston_layer_entry_remove(struct weston_layer_entry *entry)
 {
+       struct weston_paint_node *pnode, *pntmp;
+       struct weston_view *view;
+
+       /* Remove all paint nodes because we have no idea what a layer change
+        * does to view visibility on any output.
+        */
+       view = container_of(entry, struct weston_view, layer_link);
+       view->surface->compositor->view_list_needs_rebuild = true;
+
+       wl_list_for_each_safe(pnode, pntmp, &view->paint_node_list, view_link)
+               weston_paint_node_destroy(pnode);
+
        wl_list_remove(&entry->link);
        wl_list_init(&entry->link);
        entry->layer = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/desktop/seat.c 
new/weston-13.0.1/libweston/desktop/seat.c
--- old/weston-13.0.0/libweston/desktop/seat.c  2023-11-27 19:01:53.000000000 
+0100
+++ new/weston-13.0.1/libweston/desktop/seat.c  2024-04-23 17:26:12.000000000 
+0200
@@ -532,6 +532,9 @@
 
        wl_list_insert(&seat->popup_grab.surfaces, link);
 
+       if (!seat->popup_grab.keyboard.keyboard)
+               return;
+
        desktop_surface =
                weston_desktop_seat_popup_grab_get_topmost_surface(seat);
        surface = weston_desktop_surface_get_surface(desktop_surface);
@@ -552,6 +555,9 @@
                struct weston_desktop_surface *desktop_surface;
                struct weston_surface *surface;
 
+               if (!seat->popup_grab.keyboard.keyboard)
+                       return;
+
                desktop_surface =
                        
weston_desktop_seat_popup_grab_get_topmost_surface(seat);
                surface = weston_desktop_surface_get_surface(desktop_surface);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/desktop/surface.c 
new/weston-13.0.1/libweston/desktop/surface.c
--- old/weston-13.0.0/libweston/desktop/surface.c       2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/desktop/surface.c       2024-04-23 
17:26:12.000000000 +0200
@@ -892,6 +892,8 @@
 {
        struct weston_desktop_surface *child;
 
-       wl_list_for_each(child, &surface->children_list, children_link)
-               callback(child, user_data);
+       wl_list_for_each(child, &surface->children_list, children_link) {
+               if (weston_desktop_surface_get_user_data(child))
+                       callback(child, user_data);
+       }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/libweston/renderer-gl/gl-renderer.c 
new/weston-13.0.1/libweston/renderer-gl/gl-renderer.c
--- old/weston-13.0.0/libweston/renderer-gl/gl-renderer.c       2023-11-27 
19:01:53.000000000 +0100
+++ new/weston-13.0.1/libweston/renderer-gl/gl-renderer.c       2024-04-23 
17:26:12.000000000 +0200
@@ -2021,30 +2021,35 @@
 
        if (rb->pixels) {
                uint32_t *pixels = rb->pixels;
-               int stride = go->fb_size.width;
-               pixman_box32_t *extents = &rb->base.damage.extents;
+               int width = go->fb_size.width;
+               int stride = width * (compositor->read_format->bpp >> 3);
+               pixman_box32_t extents;
                struct weston_geometry rect = {
                        .x = go->area.x,
                        .width = go->area.width,
                };
 
+               extents = weston_matrix_transform_rect(&output->matrix,
+                                                      rb->base.damage.extents);
+
                if (gr->fan_debug) {
                        rect.y = go->fb_size.height - go->area.y - 
go->area.height;
                        rect.height = go->area.height;
                } else {
-                       rect.y = go->fb_size.height - go->area.y - extents->y2;
-                       rect.height = extents->y2 - extents->y1;
-                       pixels += rect.width * (extents->y1 - 
(int)output->pos.c.y);
+                       rect.y = go->fb_size.height - go->area.y - extents.y2;
+                       rect.height = extents.y2 - extents.y1;
+                       pixels += rect.width * extents.y1;
                }
 
                if (gr->gl_version >= gr_gl_version(3, 0) && ! gr->fan_debug) {
-                       glPixelStorei(GL_PACK_ROW_LENGTH, stride);
-                       rect.width = extents->x2 - extents->x1;
-                       rect.x += extents->x1 - (int)output->pos.c.x;
-                       pixels += extents->x1 - (int)output->pos.c.x;
+                       glPixelStorei(GL_PACK_ROW_LENGTH, width);
+                       rect.width = extents.x2 - extents.x1;
+                       rect.x += extents.x1;
+                       pixels += extents.x1;
                }
 
-               gl_renderer_do_read_pixels(gr, compositor->read_format, pixels, 
stride, &rect);
+               gl_renderer_do_read_pixels(gr, compositor->read_format, pixels,
+                                          stride, &rect);
 
                if (gr->gl_version >= gr_gl_version(3, 0))
                        glPixelStorei(GL_PACK_ROW_LENGTH, 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/weston-13.0.0/meson.build 
new/weston-13.0.1/meson.build
--- old/weston-13.0.0/meson.build       2023-11-27 19:01:53.000000000 +0100
+++ new/weston-13.0.1/meson.build       2024-04-23 17:26:12.000000000 +0200
@@ -1,6 +1,6 @@
 project('weston',
        'c',
-       version: '13.0.0',
+       version: '13.0.1',
        default_options: [
                'warning_level=3',
                'c_std=gnu99',

Reply via email to