diff options
Diffstat (limited to 'NxWidgets/nxwm/src/capplicationwindow.cxx')
-rw-r--r-- | NxWidgets/nxwm/src/capplicationwindow.cxx | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/NxWidgets/nxwm/src/capplicationwindow.cxx b/NxWidgets/nxwm/src/capplicationwindow.cxx index 65de1b1a4..d2e044298 100644 --- a/NxWidgets/nxwm/src/capplicationwindow.cxx +++ b/NxWidgets/nxwm/src/capplicationwindow.cxx @@ -241,6 +241,7 @@ bool CApplicationWindow::open(void) m_stopImage->addWidgetEventHandler(this); } +#ifndef CONFIG_NXWM_DISABLE_MINIMIZE // Create MINIMIZE application bitmap container m_minimizeBitmap = new NXWidgets::CRlePaletteBitmap(&g_minimizeBitmap); @@ -289,6 +290,7 @@ bool CApplicationWindow::open(void) m_minimizeImage->setBorderless(true); m_minimizeImage->addWidgetEventHandler(this); +#endif // The rest of the toolbar will hold the left-justified application label // Create the default font instance @@ -364,12 +366,16 @@ void CApplicationWindow::redraw(void) m_stopImage->setRaisesEvents(true); } - // Draw the minimize image - - m_minimizeImage->enableDrawing(); - m_minimizeImage->redraw(); - m_minimizeImage->setRaisesEvents(true); + // Draw the minimize image (which may not be present if this is a + // mimimization is disabled) + if (m_minimizeImage) + { + m_minimizeImage->enableDrawing(); + m_minimizeImage->redraw(); + m_minimizeImage->setRaisesEvents(true); + } + // And finally draw the window label m_windowLabel->enableDrawing(); @@ -392,11 +398,15 @@ void CApplicationWindow::hide(void) m_stopImage->setRaisesEvents(false); } - // Disable the minimize image - - m_minimizeImage->disableDrawing(); - m_minimizeImage->setRaisesEvents(false); + // Disable the minimize image(which may not be present if this is a + // mimimization is disabled) + if (m_minimizeImage) + { + m_minimizeImage->disableDrawing(); + m_minimizeImage->setRaisesEvents(false); + } + // Disable the window label m_windowLabel->disableDrawing(); @@ -570,7 +580,7 @@ void CApplicationWindow::handleActionEvent(const NXWidgets::CWidgetEventArgs &e) // Check the minimize image (only if the stop application image is not pressed) - else if (m_minimizeImage->isClicked()) + else if (m_minimizeImage && m_minimizeImage->isClicked()) { // Notify the controlling logic that the application should be miminsed |