Manually fixup merge botches via direct comparison with NuttX r5447.

This commit is contained in:
px4dev
2013-01-11 02:14:43 -08:00
parent 48c5d63319
commit f127495caa
428 changed files with 13932 additions and 3888 deletions
+37 -2
View File
@@ -76,6 +76,9 @@ static void nxtk_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
static void nxtk_kbdin(NXWINDOW hwnd, uint8_t nch, const uint8_t *ch,
FAR void *arg);
#endif
#ifdef CONFIG_NX_MULTIUSER
static void nxtk_blocked(NXWINDOW hwnd, FAR void *arg1, FAR void *arg2);
#endif
/****************************************************************************
* Private Data
@@ -95,6 +98,9 @@ const struct nx_callback_s g_nxtkcb =
#ifdef CONFIG_NX_KBD
, nxtk_kbdin /* kbdin */
#endif
#ifdef CONFIG_NX_MULTIUSER
, nxtk_blocked
#endif
};
/****************************************************************************
@@ -255,9 +261,20 @@ static void nxtk_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
nxgl_vectoradd(&abspos, pos, &fwnd->wnd.bounds.pt1);
/* In order to deliver mouse release events to the same window where the
* mouse down event happened, we store the initial mouse down location.
*/
if (fwnd->mbutton == 0 && buttons != 0)
{
fwnd->mpos = abspos;
}
fwnd->mbutton = buttons;
/* Is the mouse position inside of the client window region? */
if (fwnd->fwcb->mousein && nxgl_rectinside(&fwnd->fwrect, &abspos))
if (fwnd->fwcb->mousein && nxgl_rectinside(&fwnd->fwrect, &fwnd->mpos))
{
nxgl_vectsubtract(&relpos, &abspos, &fwnd->fwrect.pt1);
fwnd->fwcb->mousein((NXTKWINDOW)fwnd, &relpos, buttons, fwnd->fwarg);
@@ -265,7 +282,7 @@ static void nxtk_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
/* If the mouse position inside the toobar region? */
else if (fwnd->tbcb->mousein && nxgl_rectinside(&fwnd->tbrect, &abspos))
else if (fwnd->tbcb->mousein && nxgl_rectinside(&fwnd->tbrect, &fwnd->mpos))
{
nxgl_vectsubtract(&relpos, &abspos, &fwnd->tbrect.pt1);
fwnd->tbcb->mousein((NXTKWINDOW)fwnd, &relpos, buttons, fwnd->tbarg);
@@ -292,6 +309,24 @@ static void nxtk_kbdin(NXWINDOW hwnd, uint8_t nch, const uint8_t *ch,
}
#endif
/****************************************************************************
* Name: nxtk_blocked
****************************************************************************/
#ifdef CONFIG_NX_MULTIUSER
static void nxtk_blocked(NXWINDOW hwnd, FAR void *arg1, FAR void *arg2)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hwnd;
/* Only the client window gets keyboard input */
if (fwnd->fwcb->blocked)
{
fwnd->fwcb->blocked((NXTKWINDOW)fwnd, fwnd->fwarg, arg2);
}
}
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
+5
View File
@@ -72,6 +72,11 @@ struct nxtk_framedwindow_s
struct nxgl_rect_s fwrect;
FAR const struct nx_callback_s *fwcb;
FAR void *fwarg;
/* Initial mouse down location */
uint8_t mbutton;
struct nxgl_point_s mpos;
};
/****************************************************************************