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/cwidgetcontrol.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/cwidgetcontrol.cxx')
-rw-r--r-- | NxWidgets/libnxwidgets/src/cwidgetcontrol.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/NxWidgets/libnxwidgets/src/cwidgetcontrol.cxx b/NxWidgets/libnxwidgets/src/cwidgetcontrol.cxx index a6807dad5..1e1c9ce87 100644 --- a/NxWidgets/libnxwidgets/src/cwidgetcontrol.cxx +++ b/NxWidgets/libnxwidgets/src/cwidgetcontrol.cxx @@ -104,10 +104,17 @@ CWidgetControl::CWidgetControl(FAR const CWidgetStyle *style) m_nCh = 0; m_nCc = 0; - // Enable the semaphore that will wake up the modal loop on mouse or - // keypress events - - sem_init(&m_modalsem, 0, 0); + // Intialize semaphores: + // + // m_modalSem. The semaphore that will wake up the modal loop on mouse or + // keypress events + // m_geoSem. The semaphore that will synchronize window size and position + // informatin. + + sem_init(&m_modalSem, 0, 0); +#ifdef CONFIG_NX_MULTIUSER + sem_init(&m_geoSem, 0, 0); +#endif // Do we need to fetch the default style? @@ -197,7 +204,7 @@ void CWidgetControl::waitForModalEvent(void) { // Wait for an interesting event (like a mouse or keyboard event) - (void)sem_wait(&m_modalsem); + (void)sem_wait(&m_modalSem); } } @@ -209,7 +216,7 @@ void CWidgetControl::wakeupModalLoop(void) { if (m_modal) { - (void)sem_post(&m_modalsem); + (void)sem_post(&m_modalSem); } } @@ -227,7 +234,7 @@ void CWidgetControl::stopModal(void) // Wake up the modal loop so that it can terminate properly - (void)sem_post(&m_modalsem); + (void)sem_post(&m_modalSem); } } @@ -885,7 +892,7 @@ void CWidgetControl::takeGeoSem(void) int ret; do { - ret = sem_wait(&m_geosem); + ret = sem_wait(&m_geoSem); } while (ret < 0 && errno == EINTR); } |