vcl/unx/gtk/app/gtkdata.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 21a9089aa4324ccbdc9e9ee3669e5fb524efd03c
Author: Pierre-Eric Pelloux-Prayer <pierre-e...@lanedo.com>
Date:   Fri Jul 5 14:17:46 2013 +0200

    gtk/unx: remove successive calls to g_main_context_iteration
    
    Replace the sequence:
        non-blocking call to g_main_context_iteration
        if no-event-recvd
            blocking call to g_main_context_iteration
    With this one:
        blocking call to g_main_context_iteration until first evt reveived.
    This allows more longer sleep period, when nothing is going on (verified
    with strace).
    
    Change-Id: I8f4ea911534c90aea091fd68e9f09db11591392f
    Reviewed-on: https://gerrit.libreoffice.org/4777
    Reviewed-by: Petr Mladek <pmla...@suse.cz>
    Tested-by: Petr Mladek <pmla...@suse.cz>

diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 6abb06b..5ff5a80 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -571,12 +571,10 @@ void GtkData::Yield( bool bWait, bool 
bHandleAllCurrentEvents )
             gboolean wasOneEvent = TRUE;
             while( nMaxEvents-- && wasOneEvent )
             {
-                wasOneEvent = g_main_context_iteration( NULL, FALSE );
+                wasOneEvent = g_main_context_iteration( NULL, bWait & 
!bWasEvent );
                 if( wasOneEvent )
                     bWasEvent = true;
             }
-            if( bWait && ! bWasEvent )
-                bWasEvent = g_main_context_iteration( NULL, TRUE ) != 0;
         }
         else if( bWait )
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to