[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - vcl/unx

Vasily Melenchuk vasily.melenchuk at cib.de
Wed Mar 4 03:07:40 PST 2015


 vcl/unx/gtk/window/gtksalframe.cxx |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 70348e2f2380f9deeaa44efa4210bec42b423e3e
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
Date:   Fri Feb 27 17:47:58 2015 +0300

    tdf#89141: reverted a workaround for getting activity time
    
    A workaround applied in #i99360 (sha:44e008b01f72c3f02ab3328cdc44f987617f272b) does not works always correctly.
    This workaround is required to avoid bug in X11 which is already
    fixed in 2009 (https://bugs.launchpad.net/ubuntu/+source/ekiga/+bug/322310).
    That fix should now be spread enough so there is no reason to keep it.
    
    Change-Id: Ied6fe8f32d2da5922092bd9ed47ee56c4f67a255
    Reviewed-on: https://gerrit.libreoffice.org/14671
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 69a80316f7da33e90e1006624466f52af524f1dc)

diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 5f4fa94..d2c5994 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -1354,8 +1354,7 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
         guint32 nUserTime = 0;
         if( (nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_TOOLWINDOW)) == 0 )
         {
-            /* #i99360# ugly workaround an X11 library bug */
-            nUserTime= getDisplay()->GetLastUserEventTime( true );
+            nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
         }
         lcl_set_user_time(GTK_WINDOW(m_pWindow), nUserTime);
     }
@@ -1811,9 +1810,7 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
 
             guint32 nUserTime = 0;
             if( ! bNoActivate && (m_nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_TOOLWINDOW)) == 0 )
-                /* #i99360# ugly workaround an X11 library bug */
-                nUserTime= getDisplay()->GetLastUserEventTime( true );
-                //nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
+                nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
 
             //For these floating windows we don't want the main window to lose focus, and metacity has...
             // metacity-2.24.0/src/core/window.c
@@ -1838,9 +1835,7 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
             // awesome.
             if( nUserTime == 0 )
             {
-                /* #i99360# ugly workaround an X11 library bug */
-                nUserTime= getDisplay()->GetLastUserEventTime( true );
-                //nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
+                nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
             }
             lcl_set_user_time(GTK_WINDOW(m_pWindow), nUserTime );
 
@@ -2640,8 +2635,7 @@ void GtkSalFrame::ToTop( sal_uInt16 nFlags )
                 gtk_window_present( GTK_WINDOW(m_pWindow) );
             else
             {
-                /* #i99360# ugly workaround an X11 library bug */
-                guint32 nUserTime= getDisplay()->GetLastUserEventTime( true );
+                guint32 nUserTime = gdk_x11_get_server_time(GTK_WIDGET (m_pWindow)->window);
                 gdk_window_focus( widget_get_window(m_pWindow), nUserTime );
             }
 #if !GTK_CHECK_VERSION(3,0,0)


More information about the Libreoffice-commits mailing list