author | Francesco Abbate <francesco.bbt@gmail.com> | 2010年08月29日 23:02:17 +0200 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2010年08月29日 23:02:17 +0200 |
commit | 31ed0541a835746f4788d76286f1facea2fcf5aa (patch) | |
tree | c3518f8ffd515bb365a9646a05dab7465959f269 | |
parent | 176e096a8e6923c06395ba3668eb38c69257116b (diff) | |
download | gsl-shell-31ed0541a835746f4788d76286f1facea2fcf5aa.tar.gz |
-rw-r--r-- | agg-plot/agg_platform_support_win32.cpp | 13 | ||||
-rw-r--r-- | agg-plot/agg_platform_support_x11.cpp | 13 |
diff --git a/agg-plot/agg_platform_support_win32.cpp b/agg-plot/agg_platform_support_win32.cpp index 40f2fdd2..84d8580a 100644 --- a/agg-plot/agg_platform_support_win32.cpp +++ b/agg-plot/agg_platform_support_win32.cpp @@ -1106,9 +1106,16 @@ namespace agg { bool status; - pthread_mutex_unlock (m_specific->m_mutex); - status = ::GetMessage(&msg, 0, 0, 0); - pthread_mutex_lock (m_specific->m_mutex); + if (m_specific->m_is_mapped) + { + pthread_mutex_unlock (m_specific->m_mutex); + status = ::GetMessage(&msg, 0, 0, 0); + pthread_mutex_lock (m_specific->m_mutex); + } + else + { + status = ::GetMessage(&msg, 0, 0, 0); + } if(! status) { diff --git a/agg-plot/agg_platform_support_x11.cpp b/agg-plot/agg_platform_support_x11.cpp index 4f6143a6..c745ee9b 100644 --- a/agg-plot/agg_platform_support_x11.cpp +++ b/agg-plot/agg_platform_support_x11.cpp @@ -732,9 +732,16 @@ namespace agg } XEvent x_event; - pthread_mutex_unlock (m_specific->m_mutex); - XNextEvent(m_specific->m_display, &x_event); - pthread_mutex_lock (m_specific->m_mutex); + if (m_specific->m_is_mapped) + { + pthread_mutex_unlock (m_specific->m_mutex); + XNextEvent(m_specific->m_display, &x_event); + pthread_mutex_lock (m_specific->m_mutex); + } + else + { + XNextEvent(m_specific->m_display, &x_event); + } // In the Idle mode discard all intermediate MotionNotify events if(!m_wait_mode && x_event.type == MotionNotify) |