This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch up/7-presentation
in repository enlightenment.
View the commit online.
commit 5dc1f2e50a11a401d33db32c721d4381526680df
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Nov 23 21:42:33 2026 -0600
wl_test - let a test turn the screensaver on and read its state
The test profile keeps the screensaver off, so nothing about idling can
be tested. A test can now set a timeout and ask whether the screensaver
is on. Dimming is turned off with it, so the timeout leads straight to
the screensaver rather than to a dimmed screen first.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
src/modules/wl_test/e_mod_main.c | 19 ++++++++++++++++++-
src/protocol/wl-test.xml | 22 +++++++++++++++++++++-
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/src/modules/wl_test/e_mod_main.c b/src/modules/wl_test/e_mod_main.c
index 91709c901..fdf195ed9 100644
--- a/src/modules/wl_test/e_mod_main.c
+++ b/src/modules/wl_test/e_mod_main.c
@@ -324,6 +324,21 @@ _wl_test_cb_output_configure(struct wl_client *client EINA_UNUSED, struct wl_res
ERR("wl_test: could not configure wl_output of zone %u", zone);
}
+static void
+_wl_test_cb_screensaver_configure(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, uint32_t timeout)
+{
+ e_config->screensaver_enable = !!timeout;
+ e_config->screensaver_timeout = timeout;
+ e_config->backlight.idle_dim = 0;
+ e_comp_wl_notidle();
+}
+
+static void
+_wl_test_cb_get_screensaver(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
+{
+ wl_test_send_screensaver(resource, e_screensaver_on_get());
+}
+
/* Input is posted as ecore events, the way a backend delivers it, rather than
* fed to evas directly. Wayland clients are reached through evas callbacks
* on their frame, but a good part of E listens on the ecore side of the same
@@ -601,6 +616,8 @@ static const struct wl_test_interface _wl_test_implementation =
_wl_test_cb_client_action,
_wl_test_cb_client_action_end,
_wl_test_cb_output_configure,
+ _wl_test_cb_screensaver_configure,
+ _wl_test_cb_get_screensaver,
};
static void
@@ -634,7 +651,7 @@ e_modapi_init(E_Module *m)
return NULL;
}
- _wl_test_global = wl_global_create(e_comp_wl->wl.disp, &wl_test_interface, 6,
+ _wl_test_global = wl_global_create(e_comp_wl->wl.disp, &wl_test_interface, 7,
NULL, _wl_test_cb_bind);
if (!_wl_test_global)
{
diff --git a/src/protocol/wl-test.xml b/src/protocol/wl-test.xml
index eadddd2b8..ca456e6a0 100644
--- a/src/protocol/wl-test.xml
+++ b/src/protocol/wl-test.xml
@@ -23,7 +23,7 @@
DEALINGS IN THE SOFTWARE.
</copyright>
- <interface name="wl_test" version="6">
+ <interface name="wl_test" version="7">
<description summary="private interface for the compositor test suite">
A back door into the compositor for its own test suite. It exposes
internal state and synthesises input, so it is only built with
@@ -308,5 +308,25 @@
<arg name="w" type="int"/>
<arg name="h" type="int"/>
</request>
+
+ <request name="screensaver_configure" since="7">
+ <description summary="turn the screensaver on or off">
+ Turn the screensaver on with this timeout in seconds, or off with 0,
+ and start counting idle time from now. The test profile has it off.
+ Dimming is turned off, so that reaching the timeout turns the
+ screensaver on.
+ </description>
+ <arg name="timeout" type="uint"/>
+ </request>
+
+ <request name="get_screensaver" since="7">
+ <description summary="ask whether the screensaver is on">
+ Answered with a screensaver event.
+ </description>
+ </request>
+
+ <event name="screensaver" since="7">
+ <arg name="on" type="uint"/>
+ </event>
</interface>
</protocol>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.