From 618a6b38c32d52778d28099896b3d1996bbee239 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 23 Jul 2007 01:48:17 +0000 Subject: [PATCH] Fix a bug where the window can be focused without being raised if the 2007-07-22 Rob Bradford Fix a bug where the window can be focused without being raised if the maximize is aborted. Fixes #459027. * src/frames.c (meta_frames_button_press_event, meta_frames_button_release_event): When maximising only focus the window once the button press is released. svn path=/trunk/; revision=3273 --- ChangeLog | 9 +++++++++ src/frames.c | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9d655c63..6eba8a351 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-07-22 Rob Bradford + + Fix a bug where the window can be focused without being raised + if the maximize is aborted. Fixes #459027. + + * src/frames.c (meta_frames_button_press_event, + meta_frames_button_release_event): When maximising only focus + the window once the button press is released. + 2007-07-22 Cosimo Cecchi Unset fullscreen is an allowed action where relevant. Fixes #449427. diff --git a/src/frames.c b/src/frames.c index 76f80c2cc..e762fea96 100644 --- a/src/frames.c +++ b/src/frames.c @@ -1341,7 +1341,8 @@ meta_frames_button_press_event (GtkWidget *widget, /* focus on click, even if click was on client area */ if (event->button == 1 && !(control == META_FRAME_CONTROL_MINIMIZE || - control == META_FRAME_CONTROL_DELETE)) + control == META_FRAME_CONTROL_DELETE || + control == META_FRAME_CONTROL_MAXIMIZE)) { meta_topic (META_DEBUG_FOCUS, "Focusing window with frame 0x%lx due to button 1 press\n", @@ -1637,8 +1638,13 @@ meta_frames_button_release_event (GtkWidget *widget, case META_GRAB_OP_CLICKING_MAXIMIZE: if (control == META_FRAME_CONTROL_MAXIMIZE) + { + /* Focus the window on the maximize */ + meta_core_user_focus (gdk_display, + frame->xwindow, + event->time); meta_core_maximize (gdk_display, frame->xwindow); - + } meta_core_end_grab_op (gdk_display, event->time); break;