From cb311769b6806d5eb0a0b976d062d3c1c3cad2d4 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 28 Nov 2008 01:33:18 +0000 Subject: minor refactoring git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1322 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/graphics/nxbe/nxbe_move.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nuttx/graphics/nxbe/nxbe_move.c') diff --git a/nuttx/graphics/nxbe/nxbe_move.c b/nuttx/graphics/nxbe/nxbe_move.c index 872ed55eb..440a53016 100644 --- a/nuttx/graphics/nxbe/nxbe_move.c +++ b/nuttx/graphics/nxbe/nxbe_move.c @@ -209,9 +209,13 @@ void nxbe_move(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *rect } #endif + /* Offset the rectangle by the window origin to create a bounding box */ + + nxgl_rectoffset(&remaining, rect, wnd->origin.x, wnd->origin.y); + /* Clip to the limits of the window and of the background screen */ - nxgl_rectintersect(&remaining, rect, &wnd->bounds); + nxgl_rectintersect(&remaining, &remaining, &wnd->bounds); nxgl_rectintersect(&remaining, &remaining, &wnd->be->bkgd.bounds); if (nxgl_nullrect(&remaining)) -- cgit v1.2.3