From fe90fbdbd18eed8712bbc30909efb1b7870f859f Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 1 May 2012 22:31:26 +0000 Subject: NxWM update git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4683 42af7a65-404d-4744-a932-0658087f49c3 --- NxWidgets/nxwm/src/cnxconsole.cxx | 62 +++++++++++++++++++-------------------- NxWidgets/nxwm/src/ctaskbar.cxx | 11 +++++-- 2 files changed, 38 insertions(+), 35 deletions(-) (limited to 'NxWidgets/nxwm/src') diff --git a/NxWidgets/nxwm/src/cnxconsole.cxx b/NxWidgets/nxwm/src/cnxconsole.cxx index 5fe81d844..3652364c7 100644 --- a/NxWidgets/nxwm/src/cnxconsole.cxx +++ b/NxWidgets/nxwm/src/cnxconsole.cxx @@ -142,38 +142,6 @@ CNxConsole::~CNxConsole(void) } } -/** - * One time NSH initialization. This function must be called exactly - * once during the boot-up sequence to initialize the NSH library. - * - * @return True on successful initialization - */ - -bool nshlibInitialize(void) -{ - // Initialize the global data structure - - sem_init(&g_nxconvars.sem, 0, 0); - - // Initialize the NSH library - - nsh_initialize(); - - // If the Telnet console is selected as a front-end, then start the - // Telnet daemon. - -#ifdef CONFIG_NSH_TELNET - int ret = nsh_telnetstart(); - if (ret < 0) - { - // The daemon is NOT running! - - return false; - } -#endif - return true; -} - /** * Each implementation of IApplication must provide a method to recover * the contained CApplicationWindow instance. @@ -442,5 +410,35 @@ void CNxConsole::close(void) m_taskbar->stopApplication(static_cast(this)); } +/** + * One time NSH initialization. This function must be called exactly + * once during the boot-up sequence to initialize the NSH library. + * + * @return True on successful initialization + */ + +bool NxWM::nshlibInitialize(void) +{ + // Initialize the global data structure + + sem_init(&g_nxconvars.sem, 0, 0); + + // Initialize the NSH library + + nsh_initialize(); + + // If the Telnet console is selected as a front-end, then start the + // Telnet daemon. +#ifdef CONFIG_NSH_TELNET + int ret = nsh_telnetstart(); + if (ret < 0) + { + // The daemon is NOT running! + + return false; + } +#endif + return true; +} diff --git a/NxWidgets/nxwm/src/ctaskbar.cxx b/NxWidgets/nxwm/src/ctaskbar.cxx index faac2fa76..1dba90c5a 100644 --- a/NxWidgets/nxwm/src/ctaskbar.cxx +++ b/NxWidgets/nxwm/src/ctaskbar.cxx @@ -867,7 +867,7 @@ bool CTaskbar::redrawTaskbarWindow(void) { // Get the icon associated with this application - NXWidgets::CImage *image = m_slots.at(i).image; + NXWidgets::CImage *image = m_slots.at(i).image; // Disable drawing of the icon image; disable events from the icon @@ -962,6 +962,7 @@ bool CTaskbar::redrawBackgroundWindow(void) // Then re-draw the background image on the window + m_backImage->enableDrawing(); m_backImage->redraw(); return true; } @@ -982,7 +983,7 @@ bool CTaskbar::redrawApplicationWindow(void) { // No.. Search for that last, non-minimized application - for (int i = m_slots.size() - 1; i > 0; i--) + for (int i = m_slots.size() - 1; i >= 0; i--) { IApplication *candidate = m_slots.at(i).app; if (!candidate->isMinimized()) @@ -1002,6 +1003,10 @@ bool CTaskbar::redrawApplicationWindow(void) m_topapp = app; app->setTopApplication(true); + // Disable drawing of the background image. + + m_backImage->disableDrawing(); + // And.. Draw the application app->redraw(); @@ -1009,7 +1014,7 @@ bool CTaskbar::redrawApplicationWindow(void) } else { - // Otherwise, re-draw the background + // Otherwise, re-draw the background image m_topapp = (IApplication *)0; return redrawBackgroundWindow(); -- cgit v1.2.3