changeset 1203:fc87309372ef

Same fix for GTK2/3 as I just committed for the Mac.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 30 Sep 2011 04:05:10 +0000
parents 5c1a01c6384d
children 5cb7e52f76c7
files gtk/dw.c gtk3/dw.c
diffstat 2 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/dw.c	Fri Sep 30 04:00:38 2011 +0000
+++ b/gtk/dw.c	Fri Sep 30 04:05:10 2011 +0000
@@ -8860,10 +8860,14 @@
    if(!eve)
       return DW_ERROR_NON_INIT;
 
+   pthread_mutex_lock (&(eve->mutex));
+    
    if(eve->posted)
-      return DW_ERROR_GENERAL;
-
-   pthread_mutex_lock (&(eve->mutex));
+   {
+      pthread_mutex_unlock (&(eve->mutex));
+      return DW_ERROR_NONE;
+   }
+
    if(timeout != -1)
    {
       struct timeval now;
--- a/gtk3/dw.c	Fri Sep 30 04:00:38 2011 +0000
+++ b/gtk3/dw.c	Fri Sep 30 04:05:10 2011 +0000
@@ -7527,10 +7527,14 @@
    if(!eve)
       return DW_ERROR_NON_INIT;
 
+   pthread_mutex_lock (&(eve->mutex));
+    
    if(eve->posted)
-      return DW_ERROR_GENERAL;
-
-   pthread_mutex_lock (&(eve->mutex));
+   {
+      pthread_mutex_unlock (&(eve->mutex));
+      return DW_ERROR_NONE;
+   }
+
    if(timeout != -1)
    {
       struct timeval now;