From 40ec58787f2c8e1645bc08fcc85f73923c4792fd Mon Sep 17 00:00:00 2001 From: Rob Adams Date: Sun, 6 Apr 2003 01:22:56 +0000 Subject: [PATCH] Fix a minor off-by-one error. See #110079. 2003-04-05 Rob Adams * src/place.c (center_tile_rect_in_area): Fix a minor off-by-one error. See #110079. --- ChangeLog | 5 +++++ src/place.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4c0d4d27..df03d33f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-04-05 Rob Adams + + * src/place.c (center_tile_rect_in_area): Fix a minor off-by-one + error. See #110079. + 2003-03-30 Rob Adams * src/window.c (meta_window_move_resize_internal): When passing diff --git a/src/place.c b/src/place.c index 68b62b6bd..e851fb3c8 100644 --- a/src/place.c +++ b/src/place.c @@ -376,10 +376,10 @@ center_tile_rect_in_area (MetaRectangle *rect, * of windows tiled this way would center the windows * as a group) */ - - fluff = (work_area->width % rect->width) / 2; + + fluff = (work_area->width % (rect->width+1)) / 2; rect->x = work_area->x + fluff; - fluff = (work_area->height % rect->height) / 3; + fluff = (work_area->height % (rect->height+1)) / 3; rect->y = work_area->y + fluff; }