summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxmu/nx_eventhandler.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-29 20:26:18 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-11-29 20:26:18 +0000
commit4afd2594d4fe1bbe5e96ea83e5f77b102849221f (patch)
tree113e2564990fdb41b3caafce055a24d0c668a53d /nuttx/graphics/nxmu/nx_eventhandler.c
parenta9a76255e924240cd29d9cd9f596292d71bae8cb (diff)
downloadpx4-nuttx-4afd2594d4fe1bbe5e96ea83e5f77b102849221f.tar.gz
px4-nuttx-4afd2594d4fe1bbe5e96ea83e5f77b102849221f.tar.bz2
px4-nuttx-4afd2594d4fe1bbe5e96ea83e5f77b102849221f.zip
Using wrong(invalid) callback structure
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1357 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxmu/nx_eventhandler.c')
-rw-r--r--nuttx/graphics/nxmu/nx_eventhandler.c60
1 files changed, 34 insertions, 26 deletions
diff --git a/nuttx/graphics/nxmu/nx_eventhandler.c b/nuttx/graphics/nxmu/nx_eventhandler.c
index 136ff9b5f..a9ef438f0 100644
--- a/nuttx/graphics/nxmu/nx_eventhandler.c
+++ b/nuttx/graphics/nxmu/nx_eventhandler.c
@@ -187,45 +187,53 @@ int nx_eventhandler(NXHANDLE handle)
return ERROR;
case NX_CLIMSG_REDRAW:
- if (conn->cb->redraw)
- {
- FAR struct nxclimsg_redraw_s *redraw = (FAR struct nxclimsg_redraw_s *)buffer;
- wnd = redraw->wnd;
- DEBUGASSERT(wnd);
- wnd->cb->redraw((NXWINDOW)wnd, &redraw->rect, redraw->more);
- }
+ {
+ FAR struct nxclimsg_redraw_s *redraw = (FAR struct nxclimsg_redraw_s *)buffer;
+ wnd = redraw->wnd;
+ DEBUGASSERT(wnd);
+ if (wnd->cb->redraw)
+ {
+ wnd->cb->redraw((NXWINDOW)wnd, &redraw->rect, redraw->more);
+ }
+ }
break;
case NX_CLIMSG_NEWPOSITION:
- if (conn->cb->position)
- {
- FAR struct nxclimsg_newposition_s *postn = (FAR struct nxclimsg_newposition_s *)buffer;
- wnd = postn->wnd;
- DEBUGASSERT(wnd);
- wnd->cb->position((NXWINDOW)wnd, &postn->size, &postn->pos, &postn->bounds);
- }
+ {
+ FAR struct nxclimsg_newposition_s *postn = (FAR struct nxclimsg_newposition_s *)buffer;
+ wnd = postn->wnd;
+ DEBUGASSERT(wnd);
+ if (wnd->cb->position)
+ {
+ wnd->cb->position((NXWINDOW)wnd, &postn->size, &postn->pos, &postn->bounds);
+ }
+ }
break;
#ifdef CONFIG_NX_KBD
case NX_CLIMSG_MOUSEIN:
- if (conn->cb->mousein)
- {
- FAR struct nxclimsg_mousein_s *mouse = (FAR struct nxclimsg_mousein_s *)buffer;
- wnd = mouse->wnd;
- DEBUGASSERT(wnd);
- wnd->cb->mousein((NXWINDOW)wnd, &mouse->pos, mouse->buttons);
+ {
+ FAR struct nxclimsg_mousein_s *mouse = (FAR struct nxclimsg_mousein_s *)buffer;
+ wnd = mouse->wnd;
+ DEBUGASSERT(wnd);
+ if (wnd->cb->mousein)
+ {
+ wnd->cb->mousein((NXWINDOW)wnd, &mouse->pos, mouse->buttons);
+ }
}
break;
#endif
#ifdef CONFIG_NX_KBD
case NX_CLIMSG_KBDIN:
- if (conn->cb->kbdin)
- {
- FAR struct nxclimsg_kbdin_s *kbd = (FAR struct nxclimsg_kbdin_s *)buffer;
- wnd = kbd->wnd;
- DEBUGASSERT(wnd);
- wnd->cb->kbdin((NXWINDOW)wnd, kbd->nch, kbd->ch);
+ {
+ FAR struct nxclimsg_kbdin_s *kbd = (FAR struct nxclimsg_kbdin_s *)buffer;
+ wnd = kbd->wnd;
+ DEBUGASSERT(wnd);
+ if (wnd->cb->kbdin)
+ {
+ wnd->cb->kbdin((NXWINDOW)wnd, kbd->nch, kbd->ch);
+ }
}
break;
#endif