Fix a logic bug so that the whole titlebar becomes sensitive to mouse

2006-05-19  Björn Lindqvist  <bjourne@gmail.com>

	* frames.c: Fix a logic bug so that the whole titlebar becomes
	sensitive to mouse clicks. Fixes #336320.
This commit is contained in:
Björn Lindqvist 2006-05-19 13:15:29 +00:00 committed by Björn Lindqvist
parent 23a5f5bb58
commit 3e394580da
2 changed files with 6 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2006-05-19 Björn Lindqvist <bjourne@gmail.com>
* frames.c: Fix a logic bug so that the whole titlebar becomes
sensitive to mouse clicks. Fixes #336320.
2006-05-18 Björn Lindqvist <bjourne@gmail.com>
* resizepopup.c: Remove the unused attributes resize_gravity,

View File

@ -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;