This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch wl/browser-all
in repository enlightenment.
View the commit online.
commit 8537f29b4b1d28397181b74081a48f2ce4b96c88
Author: Cedric BAIL <[email protected]>
AuthorDate: Sat Aug 15 09:26:12 2026 -0600
wl_desktop_shell, e_comp_wl_input - scale the last of the 1:1 assumptions
wl_shell and xdg5 send configure sizes the same way xdg.c and xdg6 now do,
and xdg5 stores window geometry in canvas units. They are legacy shells that
no browser uses, but leaving them out would have made them the one place
where the conversion silently did not happen - which is worse than not having
done it at all, because it looks done.
The cursor hotspot is surface-local and places the cursor on the canvas, so
it scales like any other client position. It takes the CURSOR surface's own
scale rather than the pointed-at window's: the offset is measured inside the
cursor image.
wlcs 1.8.1: 754 passed, 15 failed, failure set unchanged. Scale-2 pixel cases
re-checked: buffer_scale 2 -> 200x200, buffer_scale 1 -> 400x400.
---
src/bin/e_comp_wl_input.c | 12 ++++++++++--
src/modules/wl_desktop_shell/wl_shell.c | 5 ++++-
src/modules/wl_desktop_shell/xdg5.c | 14 ++++++++++++--
3 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c
index 74df5d968..4776a1ac2 100644
--- a/src/bin/e_comp_wl_input.c
+++ b/src/bin/e_comp_wl_input.c
@@ -71,8 +71,16 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client EINA_UNUSED, str
if (!ec) return;
ptr->cursor_set = 1;
ptr->cursor = ec;
- ptr->offset.x = x;
- ptr->offset.y = y;
+ /* The hotspot is surface-local, and is used to place the cursor on the
+ * canvas, so it scales like any other position coming from a client. The
+ * cursor surface's own scale, not the pointed-at window's: the offset is
+ * measured inside the cursor. */
+ {
+ int scale = e_comp_wl_client_scale_get(ec);
+
+ ptr->offset.x = x * scale;
+ ptr->offset.y = y * scale;
+ }
if (ec->comp_data->pending.input)
eina_tiler_clear(ec->comp_data->pending.input);
else
diff --git a/src/modules/wl_desktop_shell/wl_shell.c b/src/modules/wl_desktop_shell/wl_shell.c
index c7832b872..1d72970d8 100644
--- a/src/modules/wl_desktop_shell/wl_shell.c
+++ b/src/modules/wl_desktop_shell/wl_shell.c
@@ -334,7 +334,10 @@ _wl_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges, i
}
if (e_client_util_is_popup(ec)) return;
- wl_shell_surface_send_configure(resource, edges, width, height);
+ /* Canvas geometry in, surface-local units out - as in xdg.c. */
+ wl_shell_surface_send_configure(resource, edges,
+ width / e_comp_wl_client_scale_get(ec),
+ height / e_comp_wl_client_scale_get(ec));
}
static void
diff --git a/src/modules/wl_desktop_shell/xdg5.c b/src/modules/wl_desktop_shell/xdg5.c
index 69a9e723b..6f0dbba31 100644
--- a/src/modules/wl_desktop_shell/xdg5.c
+++ b/src/modules/wl_desktop_shell/xdg5.c
@@ -134,7 +134,10 @@ _e_xdg_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges
if (e_object_is_del(E_OBJECT(ec))) return;
if (e_client_util_is_popup(ec)) return;
- _xdg_shell_surface_send_configure(resource, ec->fullscreen, !!ec->maximized || ec->comp_data->max, edges, width, height);
+ /* Canvas geometry in, surface-local units out - as in xdg.c. */
+ _xdg_shell_surface_send_configure(resource, ec->fullscreen, !!ec->maximized || ec->comp_data->max, edges,
+ width / e_comp_wl_client_scale_get(ec),
+ height / e_comp_wl_client_scale_get(ec));
}
static void
@@ -382,7 +385,14 @@ _e_xdg_shell_surface_cb_window_geometry_set(struct wl_client *client EINA_UNUSED
return;
}
if (e_object_is_del(E_OBJECT(ec))) return;
- EINA_RECTANGLE_SET(&ec->comp_data->shell.window, x, y, w, h);
+
+ /* Surface-local on the wire, canvas units in store - as in xdg.c. */
+ {
+ int scale = e_comp_wl_client_scale_get(ec);
+
+ EINA_RECTANGLE_SET(&ec->comp_data->shell.window,
+ x * scale, y * scale, w * scale, h * scale);
+ }
//DBG("XDG_SHELL: Window Geom Set: %d \t%d %d, %d %d", wl_resource_get_id(resource), x, y, w, h);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.