From 3e394580da8819b943324a026f0bf3e1c7999f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Fri, 19 May 2006 13:15:29 +0000 Subject: [PATCH] Fix a logic bug so that the whole titlebar becomes sensitive to mouse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2006-05-19 Björn Lindqvist * frames.c: Fix a logic bug so that the whole titlebar becomes sensitive to mouse clicks. Fixes #336320. --- ChangeLog | 5 +++++ src/frames.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee9ec5bff..f8d6681ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-19 Björn Lindqvist + + * frames.c: Fix a logic bug so that the whole titlebar becomes + sensitive to mouse clicks. Fixes #336320. + 2006-05-18 Björn Lindqvist * resizepopup.c: Remove the unused attributes resize_gravity, diff --git a/src/frames.c b/src/frames.c index 4114f642a..50d37dcc7 100644 --- a/src/frames.c +++ b/src/frames.c @@ -2304,7 +2304,6 @@ get_control (MetaFrames *frames, MetaFrameFlags flags; gboolean has_vert, has_horiz; GdkRectangle client; - int bottom_of_titlebar; meta_frames_calc_geometry (frames, frame, &fgeom); @@ -2313,8 +2312,6 @@ get_control (MetaFrames *frames, client.width = fgeom.width - fgeom.left_width - fgeom.right_width; client.height = fgeom.height - fgeom.top_height - fgeom.bottom_height; - bottom_of_titlebar = fgeom.title_rect.y + fgeom.title_rect.height; - if (POINT_IN_RECT (x, y, client)) return META_FRAME_CONTROL_CLIENT_AREA; @@ -2415,7 +2412,7 @@ get_control (MetaFrames *frames, return META_FRAME_CONTROL_RESIZE_E; } - if (y >= bottom_of_titlebar) + if (y >= fgeom.top_height) return META_FRAME_CONTROL_NONE; else return META_FRAME_CONTROL_TITLE;