This is an automated email from the git hooks/post-receive script.
git pushed a commit to reference refs/pull/234/head
in repository enlightenment.
View the commit online.
commit b37b45f478b346e4df018ef0e12dea3dbf242152
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Nov 30 21:08:17 2026 -0600
tests - take a window fullscreen and back
Maximize and restore are covered by test_client_action.c, iconify by
test_client_iconify.c, but nothing took a window fullscreen, as a user
does for a video, and back again.
The test checks that the client is told the size the frame really
takes, that the window covers the screen from its origin, and that it
comes back exactly where and as big as it was. Restoring one pixel too
wide in e_client_unfullscreen() makes it fail. Run 20 times.
Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
src/tests/wayland/meson.build | 1 +
src/tests/wayland/test_client_fullscreen.c | 57 ++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+)
diff --git a/src/tests/wayland/meson.build b/src/tests/wayland/meson.build
index 238824473..c17ccd1c5 100644
--- a/src/tests/wayland/meson.build
+++ b/src/tests/wayland/meson.build
@@ -115,6 +115,7 @@ wl_protocol_tests = [
{'E_WL_OUTPUT_SCALE': '2'}],
['privileges', 'test_privileges.c',
{'PATH': meson.current_build_dir()}],
+ ['client-fullscreen', 'test_client_fullscreen.c'],
['client-iconify', 'test_client_iconify.c',
{'ELM_TRANSITION_DURATION_FACTOR': '4'}],
['format-alpha', 'test_format_alpha.c'],
diff --git a/src/tests/wayland/test_client_fullscreen.c b/src/tests/wayland/test_client_fullscreen.c
new file mode 100644
index 000000000..3143da4a6
--- /dev/null
+++ b/src/tests/wayland/test_client_fullscreen.c
@@ -0,0 +1,57 @@
+/* Fullscreen and back through window_fullscreen_toggle, as a user does for
+ * a video. The client must be told the size the frame really takes, and the
+ * window must come back exactly where and as big as it was. */
+#include <stdio.h>
+
+#include "e_wl_testkit.h"
+
+#define APP_ID "e.test.client_fullscreen"
+#define W 320
+#define H 240
+
+int
+main(void)
+{
+ Tk_Toplevel *top;
+ Tk_Client *c;
+ unsigned int id;
+ int x0, y0, w0, h0, cw, ch;
+ Tk *tk;
+
+ tk = tk_connect("test-client-fullscreen");
+ top = tk_toplevel_new(tk, APP_ID, "fullscreen", W, H);
+ c = tk_expect(tk, APP_ID);
+ id = c->id;
+ x0 = c->x;
+ y0 = c->y;
+ w0 = c->w;
+ h0 = c->h;
+ if (c->states & WL_TEST_CLIENT_STATE_FULLSCREEN)
+ tk_fail(tk, "a new window is already fullscreen");
+
+ tk_action(tk, id, "window_fullscreen_toggle", NULL);
+ c = tk_expect(tk, APP_ID);
+ if (!(c->states & WL_TEST_CLIENT_STATE_FULLSCREEN))
+ tk_fail(tk, "not fullscreen after the toggle (states=0x%x)", c->states);
+ tk_toplevel_configured(top, &cw, &ch, NULL);
+ if ((cw <= w0) || (ch <= h0))
+ tk_fail(tk, "fullscreen, but configured to %dx%d, no bigger than %dx%d",
+ cw, ch, w0, h0);
+ if ((c->w != cw) || (c->h != ch))
+ tk_fail(tk, "fullscreen: configured to %dx%d, the frame is %dx%d",
+ cw, ch, c->w, c->h);
+ if ((c->x != 0) || (c->y != 0))
+ tk_fail(tk, "fullscreen at %d,%d, not at the screen's origin", c->x, c->y);
+
+ tk_action(tk, id, "window_fullscreen_toggle", NULL);
+ c = tk_expect(tk, APP_ID);
+ if (c->states & WL_TEST_CLIENT_STATE_FULLSCREEN)
+ tk_fail(tk, "still fullscreen after the second toggle");
+ if ((c->x != x0) || (c->y != y0) || (c->w != w0) || (c->h != h0))
+ tk_fail(tk, "back at %dx%d+%d+%d, was %dx%d+%d+%d", c->w, c->h, c->x,
+ c->y, w0, h0, x0, y0);
+
+ printf("test-client-fullscreen: ok\n");
+ tk_disconnect(tk);
+ return 0;
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.