[Xfce4-commits] [xfce/xfwm4] 01/01: stacking : Fix raise delay

noreply at xfce.org noreply at xfce.org
Sat Sep 21 16:56:25 CEST 2019


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

o   l   i   v   i   e   r       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfwm4.

commit daffbf9a321d641803bf710d409f3dcc278d675b
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Sat Sep 21 16:49:40 2019 +0200

    stacking : Fix raise delay
    
    Bug: 15974
    
    Raise delay would be ignored, because on focus change, the newly
    focused window would be raised as soon as it receives focus.
    
    Use the raise delay timeout instead of raising the window immediately
    so that the raise delay remains functional.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/events.c   |  5 -----
 src/focus.c    | 11 +++++++++--
 src/stacking.c |  1 +
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/events.c b/src/events.c
index 91d7b17..4f668dd 100644
--- a/src/events.c
+++ b/src/events.c
@@ -1619,11 +1619,6 @@ handleFocusIn (DisplayInfo *display_info, XFocusChangeEvent * ev)
                 }
             }
         }
-
-        if (screen_info->params->raise_on_focus)
-        {
-            clientResetDelayedRaise (screen_info);
-        }
     }
 
     return EVENT_FILTER_REMOVE;
diff --git a/src/focus.c b/src/focus.c
index 3760cf7..af05023 100644
--- a/src/focus.c
+++ b/src/focus.c
@@ -527,8 +527,15 @@ clientUpdateFocus (ScreenInfo *screen_info, Client * c, unsigned short flags)
 
         if (!restacked && screen_info->params->raise_on_focus)
         {
-            clientRaise (c, None);
-            clientSetLastRaise (c);
+            if (screen_info->params->click_to_focus)
+            {
+                clientRaise (c, None);
+                clientSetLastRaise (c);
+            }
+            else
+            {
+                clientResetDelayedRaise (screen_info);
+            }
         }
         frameQueueDraw (c, FALSE);
         clientUpdateOpacity (c);
diff --git a/src/stacking.c b/src/stacking.c
index 9c273ca..e652bc2 100644
--- a/src/stacking.c
+++ b/src/stacking.c
@@ -704,6 +704,7 @@ delayed_raise_cb (gpointer data)
     {
         TRACE ("client \"%s\" (0x%lx)", c->name, c->window);
         clientRaise (c, None);
+        clientSetLastRaise (c);
     }
     return (FALSE);
 }

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


More information about the Xfce4-commits mailing list