diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-20 22:10:34 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-20 22:10:34 +0000 |
commit | 7b639cc17a46229cacb9eca78a451a66122c54d8 (patch) | |
tree | 33492e787345ddef26740d5a9c1282f59324c2b0 /NxWidgets/nxwm/src/ctaskbar.cxx | |
parent | 01bce341a9d065e8250f655c246c07a525779bc0 (diff) | |
download | nuttx-7b639cc17a46229cacb9eca78a451a66122c54d8.tar.gz nuttx-7b639cc17a46229cacb9eca78a451a66122c54d8.tar.bz2 nuttx-7b639cc17a46229cacb9eca78a451a66122c54d8.zip |
Add an NxWM console/keyboard thread and eliminate all issues with NxConsole window serial input
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4755 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/nxwm/src/ctaskbar.cxx')
-rw-r--r-- | NxWidgets/nxwm/src/ctaskbar.cxx | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/NxWidgets/nxwm/src/ctaskbar.cxx b/NxWidgets/nxwm/src/ctaskbar.cxx index 2130293c2..111d800e9 100644 --- a/NxWidgets/nxwm/src/ctaskbar.cxx +++ b/NxWidgets/nxwm/src/ctaskbar.cxx @@ -610,7 +610,7 @@ bool CTaskbar::minimizeApplication(IApplication *app) // Re-draw the new top, non-minimized application - return redrawTopWindow(); + return redrawTopApplication(); } return false; @@ -672,7 +672,7 @@ bool CTaskbar::stopApplication(IApplication *app) // Re-draw the new top, non-minimized application - bool ret = redrawTopWindow(); + bool ret = redrawTopApplication(); if (ret) { // And redraw the task bar (without the icon for this task) @@ -1184,6 +1184,11 @@ bool CTaskbar::redrawTaskbarWindow(void) } #endif } + + // If there is a top application then we must now raise it above the task + // bar so that itwill get the keyboard input. + + raiseTopApplication(); } // Return success (it is not a failure if the window manager is not started @@ -1198,7 +1203,7 @@ bool CTaskbar::redrawTaskbarWindow(void) * @return true on success */ -bool CTaskbar::redrawTopWindow(void) +bool CTaskbar::redrawTopApplication(void) { // Check if there is already a top application @@ -1237,6 +1242,30 @@ bool CTaskbar::redrawTopWindow(void) } /** + * Raise the top window to the top of the NXheirarchy. + * + * @return true on success + */ + +void CTaskbar::raiseTopApplication(void) +{ + if (m_topApp) + { + // Every application provides a method to obtain its application window + + IApplicationWindow *appWindow = m_topApp->getWindow(); + + // Each application window provides a method to get the underlying NX window + + NXWidgets::INxWindow *window = appWindow->getWindow(); + + // Raise the application window to the top of the hierarchy + + window->raise(); + } +} + +/** * (Re-)draw the background window. * * @return true on success @@ -1301,17 +1330,13 @@ bool CTaskbar::redrawApplicationWindow(IApplication *app) m_backImage->disableDrawing(); - // Every application provides a method to obtain its application window + // Raise to top application to the top of the NX window heirarchy - IApplicationWindow *appWindow = app->getWindow(); - - // Each application window provides a method to get the underlying NX window - - NXWidgets::INxWindow *window = appWindow->getWindow(); + raiseTopApplication(); - // Raise the application window to the top of the hierarchy + // Every application provides a method to obtain its application window - window->raise(); + IApplicationWindow *appWindow = app->getWindow(); // Re-draw the application window toolbar @@ -1333,7 +1358,7 @@ bool CTaskbar::redrawApplicationWindow(IApplication *app) void CTaskbar::hideApplicationWindow(IApplication *app) { // The hidden window is certainly not the top application any longer - // If it was before then redrawTopWindow() will pick a new one (rather + // If it was before then redrawTopApplication() will pick a new one (rather // arbitrarily). if (app->isTopApplication()) |