now the window is not unlocked until it is mapped - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2010年08月29日 23:02:17 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2010年08月29日 23:02:17 +0200
commit31ed0541a835746f4788d76286f1facea2fcf5aa (patch)
treec3518f8ffd515bb365a9646a05dab7465959f269
parent176e096a8e6923c06395ba3668eb38c69257116b (diff)
downloadgsl-shell-31ed0541a835746f4788d76286f1facea2fcf5aa.tar.gz
now the window is not unlocked until it is mapped
Diffstat
-rw-r--r--agg-plot/agg_platform_support_win32.cpp 13
-rw-r--r--agg-plot/agg_platform_support_x11.cpp 13
2 files changed, 20 insertions, 6 deletions
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)
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月16日 16:34:26 +0000

AltStyle によって変換されたページ (->オリジナル) /