mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 11:11:38 +08:00
NxWM: Add a missing part of the message blocking logic
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4748 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -211,22 +211,23 @@ void CCallback::newKeyboardEvent(NXHANDLE hwnd, uint8_t nCh,
|
||||
* callbacks can lead to bad behavior when the callback is executed.
|
||||
*
|
||||
* @param hwnd. Window handle of the blocked window
|
||||
* @param arg. User provided argument (see nx_openwindow, nx_requestbkgd,
|
||||
* @param arg1. User provided argument (see nx_openwindow, nx_requestbkgd,
|
||||
* nxtk_openwindow, or nxtk_opentoolbar)
|
||||
* @param arg2 - User provided argument (see nx_block or nxtk_block)
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_NX_MULTIUSER
|
||||
void CCallback::windowBlocked(NXWINDOW hwnd, FAR void *arg)
|
||||
void CCallback::windowBlocked(NXWINDOW hwnd, FAR void *arg1, FAR void *arg2)
|
||||
{
|
||||
gvdbg("hwnd=%p arg=%p\n", hwnd, arg);
|
||||
gvdbg("hwnd=%p arg1=%p arg2=%p\n", hwnd, arg1, arg2);
|
||||
|
||||
// The argument must be the CWidgetControl instance
|
||||
// The first argument must be the CWidgetControl instance
|
||||
|
||||
CWidgetControl *This = (CWidgetControl *)arg;
|
||||
CWidgetControl *This = (CWidgetControl *)arg1;
|
||||
|
||||
// Just forward the callback to the CWidgetControl::windowBlocked method
|
||||
|
||||
This->windowBlocked();
|
||||
This->windowBlocked(arg2);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -162,12 +162,14 @@ void CWindowEventHandlerList::raiseKeyboardEvent(void)
|
||||
|
||||
/**
|
||||
* Raise an NX window blocked event.
|
||||
*
|
||||
* @param arg - User provided argument (see nx_block or nxtk_block)
|
||||
*/
|
||||
|
||||
void CWindowEventHandlerList::raiseBlockedEvent(void)
|
||||
void CWindowEventHandlerList::raiseBlockedEvent(FAR void *arg)
|
||||
{
|
||||
for (int i = 0; i < m_eventHandlers.size(); ++i)
|
||||
{
|
||||
m_eventHandlers.at(i)->handleBlockedEvent();
|
||||
m_eventHandlers.at(i)->handleBlockedEvent(arg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user