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

This is a really old behavior introduced in commit
585e362526 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
This commit is contained in:
Rui Matos 2015-10-20 17:50:40 +02:00
parent 053f5088df
commit e0906a77aa

View File

@ -1068,7 +1068,10 @@ handle_button_press_event (MetaUIFrame *frame,
control = get_control (frame, event->x, event->y); 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 && if (event->button == 1 &&
!(control == META_FRAME_CONTROL_MINIMIZE || !(control == META_FRAME_CONTROL_MINIMIZE ||
control == META_FRAME_CONTROL_DELETE || control == META_FRAME_CONTROL_DELETE ||
@ -1080,10 +1083,6 @@ handle_button_press_event (MetaUIFrame *frame,
meta_window_focus (frame->meta_window, event->time); 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 /* We want to shade even if we have a GrabOp, since we'll have a move grab
* if we double click the titlebar. * if we double click the titlebar.
*/ */