From 1dc4e7ed28ba36793b9d6decd89f203d686bc53b Mon Sep 17 00:00:00 2001 From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Wed, 27 Nov 2024 04:14:08 +0100 Subject: [PATCH] chase wlroots: wlr_xdg_surface_get_geometry remove MR 4788 Ref: 5c98d1a04a1439bf40c6e516086cfaff2d67f135 ("xdg-surface: fix window geometry handling") --- src/input/cursor.c | 7 +++---- src/input/ime.c | 6 ++---- src/xdg.c | 9 +++------ subprojects/wlroots.wrap | 2 +- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/input/cursor.c b/src/input/cursor.c index ea4fe369..d97b93ab 100644 --- a/src/input/cursor.c +++ b/src/input/cursor.c @@ -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); diff --git a/src/input/ime.c b/src/input/ime.c index 07b996ec..2a6c3b45 100644 --- a/src/input/ime.c +++ b/src/input/ime.c @@ -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}; diff --git a/src/xdg.c b/src/xdg.c index 24750091..cebc5e39 100644 --- 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; } /* diff --git a/subprojects/wlroots.wrap b/subprojects/wlroots.wrap index cf46d834..19138659 100644 --- a/subprojects/wlroots.wrap +++ b/subprojects/wlroots.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://gitlab.freedesktop.org/wlroots/wlroots.git -revision = 1133bc15ceb2c2bcb6df692acda6bfa39a292ab5 +revision = 5c98d1a04a1439bf40c6e516086cfaff2d67f135 [provide] dependency_names = wlroots-0.19