diff options
Diffstat (limited to 'nuttx/graphics/nxmu/nxmu_reportposition.c')
-rw-r--r-- | nuttx/graphics/nxmu/nxmu_reportposition.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nuttx/graphics/nxmu/nxmu_reportposition.c b/nuttx/graphics/nxmu/nxmu_reportposition.c index 64006a6d3..ed72ca52f 100644 --- a/nuttx/graphics/nxmu/nxmu_reportposition.c +++ b/nuttx/graphics/nxmu/nxmu_reportposition.c @@ -43,6 +43,7 @@ #include <errno.h> #include <debug.h> +#include <nuttx/nxglib.h> #include <nuttx/nx.h> #include "nxfe.h" @@ -90,10 +91,16 @@ void nxfe_reportposition(FAR struct nxbe_window_s *wnd) outmsg.pos.x = wnd->origin.x; outmsg.pos.y = wnd->origin.y; - /* Convert the frame rectangle to a window-relative rectangle */ + /* Convert the window bounding box to a window-relative rectangle */ nxgl_rectoffset(&outmsg.size, &wnd->bounds, -wnd->origin.x, -wnd->origin.y); + /* Provide the background window bounding box which is the screen limits + * It must always have (0,0) as its origin + */ + + nxgl_rectcopy(&outmsg.bounds, &wnd->be->bkgd.bounds); + /* And provide this to the client */ ret = mq_send(wnd->conn->swrmq, &outmsg, sizeof(struct nxclimsg_newposition_s), NX_SVRMSG_PRIO); |