frames: Don't pass the width/height as separate args to get_client_rect
We already have them in the fgeom.
This commit is contained in:
parent
f303ec2eaa
commit
d4ea2bbd9c
@ -606,14 +606,12 @@ meta_ui_frame_get_borders (MetaUIFrame *frame,
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
get_client_rect (MetaFrameGeometry *fgeom,
|
get_client_rect (MetaFrameGeometry *fgeom,
|
||||||
int window_width,
|
|
||||||
int window_height,
|
|
||||||
cairo_rectangle_int_t *rect)
|
cairo_rectangle_int_t *rect)
|
||||||
{
|
{
|
||||||
rect->x = fgeom->borders.total.left;
|
rect->x = fgeom->borders.total.left;
|
||||||
rect->y = fgeom->borders.total.top;
|
rect->y = fgeom->borders.total.top;
|
||||||
rect->width = window_width - fgeom->borders.total.right - rect->x;
|
rect->width = fgeom->width - fgeom->borders.total.right - rect->x;
|
||||||
rect->height = window_height - fgeom->borders.total.bottom - rect->y;
|
rect->height = fgeom->height - fgeom->borders.total.bottom - rect->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The visible frame rectangle surrounds the visible portion of the
|
/* The visible frame rectangle surrounds the visible portion of the
|
||||||
@ -1784,7 +1782,7 @@ get_control (MetaUIFrame *frame, int x, int y)
|
|||||||
cairo_rectangle_int_t client;
|
cairo_rectangle_int_t client;
|
||||||
|
|
||||||
meta_ui_frame_calc_geometry (frame, &fgeom);
|
meta_ui_frame_calc_geometry (frame, &fgeom);
|
||||||
get_client_rect (&fgeom, fgeom.width, fgeom.height, &client);
|
get_client_rect (&fgeom, &client);
|
||||||
|
|
||||||
if (POINT_IN_RECT (x, y, client))
|
if (POINT_IN_RECT (x, y, client))
|
||||||
return META_FRAME_CONTROL_CLIENT_AREA;
|
return META_FRAME_CONTROL_CLIENT_AREA;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user