diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-02 22:03:05 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-02 22:03:05 +0000 |
commit | 4b489525b44d49fa0f8cb95733dd0fdf4553c884 (patch) | |
tree | 8773aca5097c9c4fd1006bf1e35685c55619ce17 /NxWidgets/nxwm/include/cstartwindow.hxx | |
parent | 5ebf11ee63f1baaf070fd8484d99362810cd5bcc (diff) | |
download | nuttx-4b489525b44d49fa0f8cb95733dd0fdf4553c884.tar.gz nuttx-4b489525b44d49fa0f8cb95733dd0fdf4553c884.tar.bz2 nuttx-4b489525b44d49fa0f8cb95733dd0fdf4553c884.zip |
NxWM updates (with some NX and NxWidget fixes too)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4689 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/nxwm/include/cstartwindow.hxx')
-rw-r--r-- | NxWidgets/nxwm/include/cstartwindow.hxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/NxWidgets/nxwm/include/cstartwindow.hxx b/NxWidgets/nxwm/include/cstartwindow.hxx index 86245c427..5eeb51781 100644 --- a/NxWidgets/nxwm/include/cstartwindow.hxx +++ b/NxWidgets/nxwm/include/cstartwindow.hxx @@ -174,7 +174,7 @@ namespace NxWM /** * The application window is hidden (either it is minimized or it is - * maximized, but not at the top of the hierarchy + * maximized, but not at the top of the hierarchy) */ void hide(void); @@ -213,7 +213,21 @@ namespace NxWM { if (index < m_slots.size()) { - m_slots.at(index).image->click(0,0); + // Get the image widget at this index + + NXWidgets::CImage *image = m_slots.at(index).image; + + // Get the size and position of the widget + + struct nxgl_size_s imageSize; + image->getSize(imageSize); + + struct nxgl_point_s imagePos; + image->getPos(imagePos); + + // And click the image at its center + + image->click(imagePos.x + (imageSize.w >> 1), imagePos.y + (imageSize.h >> 1)); } } }; |