don't raise/focus the window if minimize/close are clicked, patch from

2002-06-09  Havoc Pennington  <hp@pobox.com>

	* src/frames.c (meta_frames_button_press_event): don't raise/focus
	the window if minimize/close are clicked, patch from Gaute
	Lindkvist #75460
This commit is contained in:
Havoc Pennington 2002-06-09 04:14:40 +00:00 committed by Havoc Pennington
parent b168954ed3
commit deed8016ed
3 changed files with 22 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2002-06-09 Havoc Pennington <hp@pobox.com>
* src/frames.c (meta_frames_button_press_event): don't raise/focus
the window if minimize/close are clicked, patch from Gaute
Lindkvist #75460
2002-06-08 Havoc Pennington <hp@pobox.com>
Cleanups to workspace popup patch. Space before all parens

View File

@ -1000,12 +1000,19 @@ event_callback (XEvent *event,
if (unmodified ||
event->xbutton.button == 1)
{
meta_window_raise (window);
if (!frame_was_receiver)
{
/* don't focus if frame received, will be
* done in frames.c if the click wasn't on
* the minimize/close button.
*/
meta_window_raise (window);
meta_topic (META_DEBUG_FOCUS,
"Focusing %s due to unmodified button %d press (display.c)\n",
window->desc, event->xbutton.button);
meta_window_focus (window, event->xbutton.time);
meta_topic (META_DEBUG_FOCUS,
"Focusing %s due to unmodified button %d press (display.c)\n",
window->desc, event->xbutton.button);
meta_window_focus (window, event->xbutton.time);
}
if (!frame_was_receiver && unmodified)
{

View File

@ -1005,7 +1005,9 @@ meta_frames_button_press_event (GtkWidget *widget,
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_DELETE))
{
meta_core_user_raise (gdk_display,
frame->xwindow);