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 64f62d962ce7b5c83af5604b0195a7e5823b1e03
Author: Cedric BAIL <[email protected]>
AuthorDate: Wed Aug 12 15:38:10 2026 -0600
wl_desktop_shell - xdg_wm_base versions 4 to 6
Grouped because each is a handful of lines in the same configure, and
separating them would put more ceremony around them than there is code.
v4, configure_bounds: the largest the client should usefully make itself,
taken from the zone's useful geometry. Not a limit we enforce - a hint, and
the one that stops a browser restoring a remembered window size from opening
larger than the work area it actually has.
v5, wm_capabilities: what the client may usefully ask for, so it can leave
buttons it would get nothing from out of its own titlebar. E offers all four -
window menu, maximize, fullscreen, minimize. Sent once when the role is taken,
which is before the first configure, as the protocol requires.
v6, suspended: not "unfocused". Suspended means the content is not being shown
to anyone and the client can stop producing frames altogether, so getting it
wrong stops a window painting. Iconified is the case E can be sure of.
Each is gated on the version the client actually bound, so a v1 client sees
none of it.
wlcs, XdgToplevelStableTest and XdgPopupTest at v6: wm_capabilities_are_sent
passes, and the only failures left in those suites are the two interactive
move/resize ones that were already failing before this branch.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
src/modules/wl_desktop_shell/xdg.c | 52 +++++++++++++++++++++++++++++++++++++-
src/tests/wayland/globals.expected | 2 +-
src/tests/wlcs/e_wlcs.c | 2 +-
3 files changed, 53 insertions(+), 3 deletions(-)
diff --git a/src/modules/wl_desktop_shell/xdg.c b/src/modules/wl_desktop_shell/xdg.c
index 05606e5af..001318fe9 100644
--- a/src/modules/wl_desktop_shell/xdg.c
+++ b/src/modules/wl_desktop_shell/xdg.c
@@ -6,7 +6,7 @@
/* Every child object is created at the version its parent was bound at,
* so this is the only number to move when a version is finished. */
-#define XDG_WM_BASE_SERVER_VERSION 3
+#define XDG_WM_BASE_SERVER_VERSION 6
typedef enum
{
@@ -502,6 +502,47 @@ _e_xdg_surface_tiled_states_add(struct wl_resource *resource, struct wl_array *s
}
}
+/* v5. What the client may usefully ask for, so it can leave the buttons it
+ * would get nothing from out of its own titlebar. E offers all four. Sent
+ * once, when the role is taken, which is before the first configure. */
+static void
+_e_xdg_toplevel_wm_capabilities_send(struct wl_resource *resource)
+{
+ struct wl_array caps;
+ uint32_t *c;
+
+ if (wl_resource_get_version(resource) < XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION)
+ return;
+
+ wl_array_init(&caps);
+ c = wl_array_add(&caps, sizeof(*c) * 4);
+ if (c)
+ {
+ c[0] = XDG_TOPLEVEL_WM_CAPABILITIES_WINDOW_MENU;
+ c[1] = XDG_TOPLEVEL_WM_CAPABILITIES_MAXIMIZE;
+ c[2] = XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN;
+ c[3] = XDG_TOPLEVEL_WM_CAPABILITIES_MINIMIZE;
+ xdg_toplevel_send_wm_capabilities(resource, &caps);
+ }
+ wl_array_release(&caps);
+}
+
+/* v4. The largest the client should make itself - not a limit we enforce, a
+ * hint that keeps a browser restoring a remembered window size from opening
+ * larger than the work area it has. */
+static void
+_e_xdg_toplevel_configure_bounds_send(struct wl_resource *resource, E_Client *ec)
+{
+ int zw, zh;
+
+ if (wl_resource_get_version(resource) < XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION)
+ return;
+ if (!ec->zone) return;
+
+ e_zone_useful_geometry_get(ec->zone, NULL, NULL, &zw, &zh);
+ xdg_toplevel_send_configure_bounds(resource, zw, zh);
+}
+
static void
_xdg_shell_surface_send_configure(struct wl_resource *resource, Eina_Bool fullscreen, Eina_Bool maximized, uint32_t edges, int32_t width, int32_t height)
{
@@ -578,7 +619,14 @@ _xdg_shell_surface_send_configure(struct wl_resource *resource, Eina_Bool fullsc
_e_xdg_surface_state_add(resource, &states, XDG_TOPLEVEL_STATE_RESIZING);
if (activated)
_e_xdg_surface_state_add(resource, &states, XDG_TOPLEVEL_STATE_ACTIVATED);
+ /* v6. Not "unfocused" - suspended means the content is not being shown to
+ * anyone, so the client can stop producing frames entirely. Iconified is
+ * the case E can be sure of. */
+ if (ec->iconic &&
+ (wl_resource_get_version(resource) >= XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION))
+ _e_xdg_surface_state_add(resource, &states, XDG_TOPLEVEL_STATE_SUSPENDED);
+ _e_xdg_toplevel_configure_bounds_send(resource, ec);
serial = wl_display_next_serial(e_comp_wl->wl.disp);
xdg_toplevel_send_configure(resource, width, height, &states);
{
@@ -1607,6 +1655,8 @@ _e_xdg_surface_cb_toplevel_get(struct wl_client *client EINA_UNUSED, struct wl_r
&_e_xdg_toplevel_interface, ec,
e_shell_surface_cb_destroy);
+ _e_xdg_toplevel_wm_capabilities_send(cdata->shell.surface);
+
/* A new toplevel supersedes any open menu. Dismiss here, when the role is
* taken, rather than on map: the client is entitled to sit on the first
* configure for as long as it likes, and a menu left grabbing the keyboard
diff --git a/src/tests/wayland/globals.expected b/src/tests/wayland/globals.expected
index cacb0d0d5..800c39749 100644
--- a/src/tests/wayland/globals.expected
+++ b/src/tests/wayland/globals.expected
@@ -7,7 +7,7 @@ wl_seat 5
wl_shell 1
wl_shm 1
wl_subcompositor 1
-xdg_wm_base 3
+xdg_wm_base 6
zwp_e_session_recovery 1
zwp_pointer_constraints_v1 1
zwp_relative_pointer_manager_v1 1
diff --git a/src/tests/wlcs/e_wlcs.c b/src/tests/wlcs/e_wlcs.c
index f3be2e82e..b1ead391a 100644
--- a/src/tests/wlcs/e_wlcs.c
+++ b/src/tests/wlcs/e_wlcs.c
@@ -700,7 +700,7 @@ static const WlcsExtensionDescriptor _extensions[] =
{ "wl_seat", 5 },
{ "wl_output", 2 },
{ "wl_data_device_manager", 3 },
- { "xdg_wm_base", 3 },
+ { "xdg_wm_base", 6 },
{ "zxdg_shell_v6", 1 },
{ "wl_shell", 1 },
};
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.