]> git.mdlowis.com Git - proto/labwc.git/commitdiff
chase wlroots: use WLR_PRIVATE (MR 4842)
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Wed, 27 Nov 2024 03:48:45 +0000 (04:48 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 21 May 2025 05:36:08 +0000 (06:36 +0100)
Ref: 6006023a377868187f73d2e0922bbe952072684f
("Use WLR_PRIVATE for private fields")

src/common/scene-helpers.c
src/magnifier.c
src/server.c
src/view.c
subprojects/wlroots.wrap

index e4a5e4c4608301922cbdd0d13d6ef404062af3c4..c05a5226604e36c2a3eb28eed059f2786f615056 100644 (file)
@@ -58,8 +58,8 @@ scene_output_damage(struct wlr_scene_output *scene_output,
 
        if (pixman_region32_not_empty(&clipped)) {
                wlr_damage_ring_add(&scene_output->damage_ring, &clipped);
-               pixman_region32_union(&scene_output->pending_commit_damage,
-                       &scene_output->pending_commit_damage, &clipped);
+               pixman_region32_union(&scene_output->WLR_PRIVATE.pending_commit_damage,
+                       &scene_output->WLR_PRIVATE.pending_commit_damage, &clipped);
        }
 
        pixman_region32_fini(&clipped);
@@ -85,8 +85,10 @@ lab_wlr_scene_output_commit(struct wlr_scene_output *scene_output,
         * rendering on every output commit and overloads CPU.
         * We also need to verify the necessity of wants_magnification.
         */
-       if (!wlr_output->needs_frame && !pixman_region32_not_empty(
-                       &scene_output->pending_commit_damage) && !wants_magnification) {
+       if (!wlr_output->needs_frame
+                       && !pixman_region32_not_empty(
+                               &scene_output->WLR_PRIVATE.pending_commit_damage)
+                       && !wants_magnification) {
                return true;
        }
 
index e1b3fcd9b87db069ab15304ca4282159aa94eb4a..0846e02ad343b3d06e1e87e03b8bc723c46e683f 100644 (file)
@@ -237,7 +237,7 @@ static void
 enable_magnifier(struct server *server, bool enable)
 {
        magnify_on = enable;
-       server->scene->direct_scanout = enable ? false
+       server->scene->WLR_PRIVATE.direct_scanout = enable ? false
                : server->direct_scanout_enabled;
 }
 
index 9e87655ede791dc11fe6f1c3d2d9b1758938228e..3c5938c0bf2c2502330a09d1e0f4f1c2273f79ed 100644 (file)
@@ -549,7 +549,7 @@ server_init(struct server *server)
                wlr_log(WLR_ERROR, "unable to create scene");
                exit(EXIT_FAILURE);
        }
-       server->direct_scanout_enabled = server->scene->direct_scanout;
+       server->direct_scanout_enabled = server->scene->WLR_PRIVATE.direct_scanout;
 
        /*
         * The order in which the scene-trees below are created determines the
index cf97b860b218d7e8274b017aa1c7c4565d089e2b..2b01cce8a15442787b3cc9b71a5274870fb1eb1d 100644 (file)
@@ -552,7 +552,7 @@ view_update_outputs(struct view *view)
        wl_list_for_each(output, &view->server->outputs, link) {
                if (output_is_usable(output) && wlr_output_layout_intersects(
                                layout, output->wlr_output, &view->current)) {
-                       new_outputs |= (1ull << output->scene_output->index);
+                       new_outputs |= (1ull << output->scene_output->WLR_PRIVATE.index);
                }
        }
 
@@ -569,7 +569,7 @@ view_on_output(struct view *view, struct output *output)
        assert(view);
        assert(output);
        return output->scene_output
-                       && (view->outputs & (1ull << output->scene_output->index));
+                       && (view->outputs & (1ull << output->scene_output->WLR_PRIVATE.index));
 }
 
 void
index b51516a2a3c79c9a416ffac9cf460feb3aa703f9..5bd994b6b937619e4453d2e97b411482717715c3 100644 (file)
@@ -1,6 +1,6 @@
 [wrap-git]
 url = https://gitlab.freedesktop.org/wlroots/wlroots.git
-revision = 009515161bd97d8f920d72d31ef462f2608688e8
+revision = 6006023a377868187f73d2e0922bbe952072684f
 
 [provide]
 dependency_names = wlroots-0.19