This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch connman-backend
in repository enlightenment.

View the commit online.

commit cc9937b04c78e17a3ec48003e8e1f1b748bed680
Author: Cedric BAIL <[email protected]>
AuthorDate: Sat Nov 28 16:05:02 2026 -0600

    e_comp_wl - keep the screensaver off for the whole of a drag
    
    A drag and drop inhibits the screensaver, so that it does not come on
    while the user holds a drag still. e_comp_wl_screensaver_inhibit()
    took the idle timer away, but the next input started it again:
    e_comp_wl_notidle() arms the timer on every input event and did not
    know about the inhibit. A drag always moves the pointer, so the inhibit
    only lasted until its first motion, and the screen could blank under a
    drag held still for longer than the screensaver timeout.
    
    e_comp_wl_notidle() now arms no timer while the screensaver is
    inhibited. The callers of the inhibit are the Wayland drag and the
    Xwayland drag; both turn it off when the drag ends, which arms the
    timer again.
    
    wl-idle-inhibit now also starts a drag, moves the pointer once, and
    holds it still past twice the timeout: the screensaver must stay off,
    then come on once the drag is dropped. Without this it comes on during
    the drag.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 src/bin/e_comp_wl.c                   |  3 +--
 src/tests/wayland/test_idle_inhibit.c | 25 ++++++++++++++++++++++++-
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index ced36665a..8d2aff06f 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -4734,6 +4734,7 @@ e_comp_wl_notidle(void)
           (0.3, _e_comp_wl_screensaver_eval_cb, NULL);
      }
    E_FREE_FUNC(screensaver_idle_timer, ecore_timer_del);
+   if (saver_inhibit) return;
    timeout = e_screensaver_timeout_get(EINA_TRUE);
    if (timeout > 0)
      screensaver_idle_timer = ecore_timer_add
@@ -4755,6 +4756,4 @@ e_comp_wl_screensaver_inhibit(Eina_Bool inhibit)
    if (inhibit == saver_inhibit) return;
    saver_inhibit = inhibit;
    e_comp_wl_notidle();
-   if (inhibit)
-     E_FREE_FUNC(screensaver_idle_timer, ecore_timer_del);
 }
diff --git a/src/tests/wayland/test_idle_inhibit.c b/src/tests/wayland/test_idle_inhibit.c
index 9d214555e..7e09a737b 100644
--- a/src/tests/wayland/test_idle_inhibit.c
+++ b/src/tests/wayland/test_idle_inhibit.c
@@ -1,7 +1,9 @@
 /* zwp_idle_inhibitor_v1 keeps the screensaver off only while its surface
- * is visible. */
+ * is visible. A drag and drop keeps it off until it ends, even with the
+ * pointer still. */
 #include <stdio.h>
 #include <time.h>
+#include <linux/input-event-codes.h>
 
 #include "e_wl_testkit.h"
 #include "idle-inhibit-unstable-v1-client-protocol.h"
@@ -79,10 +81,14 @@ main(void)
 {
    struct zwp_idle_inhibit_manager_v1 *manager;
    struct zwp_idle_inhibitor_v1 *inhibitor;
+   struct wl_data_device_manager *ddm;
+   struct wl_data_device *device;
+   struct wl_data_source *source;
    struct wl_surface *bare;
    Tk_Toplevel *top;
    Saver saver;
    unsigned int id;
+   int x, y;
 
    saver.tk = tk_connect(PROG);
    saver.tester = tk_bind(saver.tk, &wl_test_interface, 7);
@@ -124,6 +130,23 @@ main(void)
    zwp_idle_inhibitor_v1_destroy(inhibitor);
    tk_sync(saver.tk);
 
+   ddm = tk_bind(saver.tk, &wl_data_device_manager_interface, 3);
+   device = wl_data_device_manager_get_data_device(ddm, tk_bind(saver.tk, &wl_seat_interface, 1));
+   source = wl_data_device_manager_create_data_source(ddm);
+   wl_data_source_offer(source, "text/plain");
+   wl_data_source_set_actions(source, WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY);
+   tk_surface_geometry(saver.tk, tk_toplevel_surface(top), &x, &y, NULL, NULL);
+   tk_pointer_warp(saver.tk, x + 20, y + 20);
+   _saver_wait(&saver, 0, "input wakes the screen");
+   tk_pointer_button(saver.tk, BTN_LEFT, 1);
+   tk_sync(saver.tk);
+   wl_data_device_start_drag(device, source, tk_toplevel_surface(top), NULL, 0);
+   tk_sync(saver.tk);
+   tk_pointer_warp(saver.tk, x + 40, y + 40);
+   _saver_stays_off(&saver, "a drag in progress, once the pointer stopped");
+   tk_pointer_button(saver.tk, BTN_LEFT, 0);
+   _saver_wait(&saver, 1, "the drag is over");
+
    tk_disconnect(saver.tk);
    printf(PROG ": ok\n");
    return 0;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to