diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-02 14:38:54 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-02 14:38:54 +0000 |
commit | addae64d8c028ffd2c3bb05ec7ebdd1a73720998 (patch) | |
tree | 1b921ee8364e6156ee58ee1b85b34a91a69aa435 /NxWidgets/libnxwidgets/src/cnxtkwindow.cxx | |
parent | 1c9fc6cb19e21749c86389b13196075b97deab73 (diff) | |
download | nuttx-addae64d8c028ffd2c3bb05ec7ebdd1a73720998.tar.gz nuttx-addae64d8c028ffd2c3bb05ec7ebdd1a73720998.tar.bz2 nuttx-addae64d8c028ffd2c3bb05ec7ebdd1a73720998.zip |
NxWM initial displays come up okay
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4687 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/libnxwidgets/src/cnxtkwindow.cxx')
-rw-r--r-- | NxWidgets/libnxwidgets/src/cnxtkwindow.cxx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx index ba62ee435..bae9cb815 100644 --- a/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx +++ b/NxWidgets/libnxwidgets/src/cnxtkwindow.cxx @@ -133,23 +133,12 @@ CNxToolbar *CNxTkWindow::openToolbar(nxgl_coord_t height) { if (m_hNxTkWindow && !m_toolbar) { - // Get current window style from the widget control - - CWidgetStyle style; - m_widgetControl->getWidgetStyle(&style); - - // Create a new controlling widget for the window - - CWidgetControl *widgetControl = new CWidgetControl(&style); - - // And create the toolcar + // Create the toolbar. Note that we use the SAME underlying + // widget control. That is because the tool bar really resides + // in the same "physical" window. m_toolbar = new CNxToolbar(this, m_hNxTkWindow, - widgetControl, height); - if (!m_toolbar) - { - delete widgetControl; - } + m_widgetControl, height); } return m_toolbar; } |