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 ccb97e557b39c0c3028d437ab3118c02072310b0
Author: Cedric BAIL <[email protected]>
AuthorDate: Tue Aug 11 01:21:31 2026 -0600
e_comp_wl - take the window geometry offset off once, not once a map
A client that unmaps by attaching a NULL buffer and then attaches a real
one again came back with its buffer shifted by the xdg window geometry
offset, once per remap.
The offset is subtracted under `first`, which is computed as "this pixmap
is not usable". That reads like "this surface has never had a buffer",
and it is not: a surface whose client has just unmapped it has no usable
pixmap either. So the placement that should happen once happens on every
remap, and each one walks the buffer another offset away - a surface with
a 12,5 offset reported the pointer at 16,9 where the client expected 4,4.
Remember that the offset has been applied instead of inferring it from the
pixmap, and leave `first` alone: it is used for other decisions in the
same function, and widening it to mean "first ever" would reach further
than this.
wlcs: 692 passed -> 695, no regressions. Fixes
input_seen_after_surface_unmapped_and_remapped and its subsurface twin for
the one builder that sets a window geometry offset, and leaves the
original pointer_ and touch_respects_window_geom_offset passing on both
stable and v6 - those cover the first-map direction this could have traded
away.
---
src/bin/e_comp_wl.c | 14 ++++++++++++--
src/bin/e_comp_wl.h | 4 ++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 877b3b2e7..1a635c55b 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1645,8 +1645,18 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
else
{
x = ec->client.x, y = ec->client.y;
- if (first)
- x -= ec->comp_data->shell.window.x, y -= ec->comp_data->shell.window.y;
+ /* Take the window geometry offset off the position once, when
+ * the surface is first placed. `first` means no usable pixmap,
+ * which is true of a surface that has never had a buffer and
+ * equally true of one whose client unmapped it by attaching
+ * NULL - so on its own it fires again on every remap and walks
+ * the buffer a further offset away each time. */
+ if (first && (!ec->comp_data->geometry_placed))
+ {
+ x -= ec->comp_data->shell.window.x;
+ y -= ec->comp_data->shell.window.y;
+ ec->comp_data->geometry_placed = 1;
+ }
}
if ((!ec->comp_data->buffer_commit) && e_client_has_xwindow(ec))
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index d21dc1651..61af8c1bd 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -383,6 +383,10 @@ struct _E_Comp_Wl_Client_Data
int early_frame;
Eina_Bool mapped E_BITFIELD;
+ /* Whether the xdg window geometry offset has already been taken off this
+ * client's position. It is a one-off placement, not something to redo
+ * every time the surface gets a buffer again. */
+ Eina_Bool geometry_placed E_BITFIELD;
Eina_Bool evas_init E_BITFIELD;
Eina_Bool cursor E_BITFIELD;
Eina_Bool moved E_BITFIELD;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.