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

git pushed a commit to branch v-0.25.0
in repository enlightenment.

View the commit online.

commit bc2470cbd8f913773cd2bf64bf1419084fd2fd16
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Fri Mar 25 10:40:00 2022 +0000

    fix fullscreen flicker/toggle when window is small and we get mouse out
    
    we get a spurious mouse out if your window is small then told to go
    fullscreen which then causes in ponter focus a unfocus event which
    causes e to restore window to its non-fulscreen mode which then may
    cause a mouse in again if mouse is positioned right which causes a "go
    fullscreen now again" and so on... fix this and ignore that mouse out
    right after going fullscreen.
    
    @fix
---
 src/bin/e_client.c | 1 +
 src/bin/e_client.h | 2 ++
 src/bin/e_comp_x.c | 6 ++++++
 3 files changed, 9 insertions(+)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index a0314df2f..01a1b0bbf 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -4533,6 +4533,7 @@ e_client_fullscreen(E_Client *ec, E_Fullscreen policy)
      evas_object_layer_set(ec->frame, E_LAYER_CLIENT_FULLSCREEN);
 
    ec->fullscreen = 1;
+   ec->fullscreen_time = ecore_time_get();
    ec->unfullscreen_forced = 0;
 #ifndef HAVE_WAYLAND_ONLY
    if ((eina_list_count(e_comp->zones) > 1) ||
diff --git a/src/bin/e_client.h b/src/bin/e_client.h
index 826cf352d..cc4bc9b1a 100644
--- a/src/bin/e_client.h
+++ b/src/bin/e_client.h
@@ -693,6 +693,8 @@ struct E_Client
       int           x, y;
    } drag;
 
+   double                     fullscreen_time;
+
    Ecore_Timer               *raise_timer;
    E_Client_Move_Intercept_Cb move_intercept_cb;
    E_Remember                *remember;
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index b9b35589e..c31a234a3 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -2704,6 +2704,12 @@ _e_comp_x_mouse_out(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_
      return ECORE_CALLBACK_PASS_ON;
    ec = _e_comp_x_client_find_by_window(ev->win);
    if (!ec) return ECORE_CALLBACK_RENEW;
+   // if we're fullscreen and see a mout out within a short time of having
+   // set this client ot fullscreen - it's a "false flag" that is a bi-product
+   // of things moving around while becoming fullscreen, so ignore it
+   if ((ec->fullscreen) &&
+       (ecore_time_get() - ec->fullscreen_time) < 0.2) // 0.2sec enough
+     return ECORE_CALLBACK_RENEW;
    if (_e_comp_x_client_data_get(ec)->deleted) return ECORE_CALLBACK_RENEW;
    if (mouse_client == ec)
      {

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

Reply via email to