[Xfce4-commits] <xfwm4:xfce-4.8> Revert "Fix panel plugins such as verve not receiving focus in focus follow mouse mode (bug #6617)."

Olivier Fourdan noreply at xfce.org
Mon Sep 12 10:44:01 CEST 2011


Updating branch refs/heads/xfce-4.8
         to 0f80fca9277fccd5351fafa64ba884d632fe0c43 (commit)
       from 5a4a1b0394490cb069feb3833e956a1c233669c2 (commit)

commit 0f80fca9277fccd5351fafa64ba884d632fe0c43
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Mon Sep 12 10:41:59 2011 +0200

    Revert "Fix panel plugins such as verve not receiving focus in focus follow mouse mode (bug #6617)."
    
    This reverts commit 5a4a1b0394490cb069feb3833e956a1c233669c2.

 src/client.c |    9 ++++++---
 src/client.h |    3 ++-
 src/netwm.c  |    4 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/client.c b/src/client.c
index a3e0d6d..a7cd5f7 100644
--- a/src/client.c
+++ b/src/client.c
@@ -883,7 +883,7 @@ clientMoveResizeWindow (Client * c, XWindowChanges * wc, unsigned long mask)
             }
             else
             {
-                clientActivate (c, getXServerTime (display_info));
+                clientActivate (c, getXServerTime (display_info), FALSE);
             }
         }
     }
@@ -2569,7 +2569,7 @@ clientToggleShowDesktop (ScreenInfo *screen_info)
 }
 
 void
-clientActivate (Client * c, guint32 timestamp)
+clientActivate (Client * c, guint32 timestamp, gboolean source_is_application)
 {
     ScreenInfo *screen_info;
     Client *focused;
@@ -2607,7 +2607,10 @@ clientActivate (Client * c, guint32 timestamp)
         }
         clientRaise (sibling, None);
         clientShow (sibling, TRUE);
-        clientSetFocus (screen_info, c, timestamp, NO_FOCUS_FLAG);
+        if (source_is_application || screen_info->params->click_to_focus)
+        {
+            clientSetFocus (screen_info, c, timestamp, NO_FOCUS_FLAG);
+        }
         clientSetLastRaise (c);
     }
     else
diff --git a/src/client.h b/src/client.h
index 6b501a6..10137f7 100644
--- a/src/client.h
+++ b/src/client.h
@@ -392,7 +392,8 @@ void                     clientWithdrawAll                      (Client *,
 void                     clientClearAllShowDesktop              (ScreenInfo *);
 void                     clientToggleShowDesktop                (ScreenInfo *);
 void                     clientActivate                         (Client *,
-                                                                 guint32);
+                                                                 guint32,
+                                                                 gboolean);
 void                     clientClose                            (Client *);
 void                     clientKill                             (Client *);
 void                     clientTerminate                        (Client *);
diff --git a/src/netwm.c b/src/netwm.c
index 1f88c93..7ff5c2e 100644
--- a/src/netwm.c
+++ b/src/netwm.c
@@ -1403,13 +1403,13 @@ clientHandleNetActiveWindow (Client *c, guint32 timestamp, gboolean source_is_ap
         }
         else
         {
-            clientActivate (c, ev_time);
+            clientActivate (c, ev_time, source_is_application);
         }
     }
     else
     {
         /* The request is either from a pager or an older client, use the most accurate timestamp */
-        clientActivate (c, getXServerTime (display_info));
+        clientActivate (c, getXServerTime (display_info), source_is_application);
     }
 }
 


More information about the Xfce4-commits mailing list