[mutter] ui/frames: Don't focus if the button press is on the client area



commit e0906a77aa26780417ceb5a6e947eea04e85878b
Author: Rui Matos <tiagomatos gmail com>
Date:   Tue Oct 20 17:50:40 2015 +0200

    ui/frames: Don't focus if the button press is on the client area
    
    This is a really old behavior introduced in commit
    585e3625266dd0fadcdb033739760db423d31714 which is inconsistent since
    it only applies to SSD windows.
    
    If we really want this, we should focus the window elsewhere so that
    it applies consistently to all windows.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756789

 src/ui/frames.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index b29a592..961ecac 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -1068,7 +1068,10 @@ handle_button_press_event (MetaUIFrame *frame,
 
   control = get_control (frame, event->x, event->y);
 
-  /* focus on click, even if click was on client area */
+  /* don't do the rest of this if on client area */
+  if (control == META_FRAME_CONTROL_CLIENT_AREA)
+    return FALSE; /* not on the frame, just passed through from client */
+
   if (event->button == 1 &&
       !(control == META_FRAME_CONTROL_MINIMIZE ||
         control == META_FRAME_CONTROL_DELETE ||
@@ -1080,10 +1083,6 @@ handle_button_press_event (MetaUIFrame *frame,
       meta_window_focus (frame->meta_window, event->time);
     }
 
-  /* don't do the rest of this if on client area */
-  if (control == META_FRAME_CONTROL_CLIENT_AREA)
-    return FALSE; /* not on the frame, just passed through from client */
-
   /* We want to shade even if we have a GrabOp, since we'll have a move grab
    * if we double click the titlebar.
    */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]