]> git.mdlowis.com Git - proto/labwc.git/commitdiff
chase wlroots: wlr_xdg_surface_get_geometry remove MR 4788
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Wed, 27 Nov 2024 03:14:08 +0000 (04:14 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 21 May 2025 05:36:08 +0000 (06:36 +0100)
Ref: 5c98d1a04a1439bf40c6e516086cfaff2d67f135
("xdg-surface: fix window geometry handling")

src/input/cursor.c
src/input/ime.c
src/xdg.c
subprojects/wlroots.wrap

index ea4fe36973eaed0e07eb6cf41c804aa1306fab8f..d97b93aba990977fa5a2114472fc830771367c9f 100644 (file)
@@ -463,10 +463,9 @@ process_cursor_motion_out_of_surface(struct server *server,
                ly = view->current.y;
                /* Take into account invisible xdg-shell CSD borders */
                if (view->type == LAB_XDG_SHELL_VIEW) {
-                       struct wlr_box geo;
-                       wlr_xdg_surface_get_geometry(xdg_surface_from_view(view), &geo);
-                       lx -= geo.x;
-                       ly -= geo.y;
+                       struct wlr_xdg_surface *xdg_surface = xdg_surface_from_view(view);
+                       lx -= xdg_surface->geometry.x;
+                       ly -= xdg_surface->geometry.y;
                }
        } else if (node && wlr_layer_surface_v1_try_from_wlr_surface(surface)) {
                wlr_scene_node_coords(node, &lx, &ly);
index 07b996ec881aa7ee9743eba1211b04843b20cbe3..2a6c3b453b92fa701b55d0949085cc645cdd0bda 100644 (file)
@@ -230,10 +230,8 @@ update_popup_position(struct input_method_popup *popup)
 
                if (xdg_surface) {
                        /* Take into account invisible xdg-shell CSD borders */
-                       struct wlr_box geo;
-                       wlr_xdg_surface_get_geometry(xdg_surface, &geo);
-                       cursor_rect.x -= geo.x;
-                       cursor_rect.y -= geo.y;
+                       cursor_rect.x -= xdg_surface->geometry.x;
+                       cursor_rect.y -= xdg_surface->geometry.y;
                }
        } else {
                cursor_rect = (struct wlr_box){0};
index 247500917ec8621fcdc0306777e1315063f28710..cebc5e393c8d23edc206ebb9280e17d546927192 100644 (file)
--- a/src/xdg.c
+++ b/src/xdg.c
@@ -149,8 +149,7 @@ handle_commit(struct wl_listener *listener, void *data)
                return;
        }
 
-       struct wlr_box size;
-       wlr_xdg_surface_get_geometry(xdg_surface, &size);
+       struct wlr_box size = xdg_surface->geometry;
        bool update_required = false;
 
        /*
@@ -727,10 +726,8 @@ xdg_toplevel_view_map(struct view *view)
                 * dimensions remain zero until handle_commit().
                 */
                if (wlr_box_empty(&view->pending)) {
-                       struct wlr_box size;
-                       wlr_xdg_surface_get_geometry(xdg_surface, &size);
-                       view->pending.width = size.width;
-                       view->pending.height = size.height;
+                       view->pending.width = xdg_surface->geometry.width;
+                       view->pending.height = xdg_surface->geometry.height;
                }
 
                /*
index cf46d8341f547d7dc901b25f0da660a56b55a8e7..1913865915ba50dcd296b1bfd44b4097f82ffc0a 100644 (file)
@@ -1,6 +1,6 @@
 [wrap-git]
 url = https://gitlab.freedesktop.org/wlroots/wlroots.git
-revision = 1133bc15ceb2c2bcb6df692acda6bfa39a292ab5
+revision = 5c98d1a04a1439bf40c6e516086cfaff2d67f135
 
 [provide]
 dependency_names = wlroots-0.19