summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2015-02-27 17:47:58 +0300
committerAndras Timar <andras.timar@collabora.com>2015-03-04 03:07:37 -0800
commit70348e2f2380f9deeaa44efa4210bec42b423e3e (patch)
tree1faa1c09bb39325520082aca3308a66140234647
parent79d83114402ed8f1fee70147c675bff81a41b173 (diff)
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@ubuntu.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 69a80316f7da33e90e1006624466f52af524f1dc)
-rw-r--r--vcl/unx/gtk/window/gtksalframe.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 5f4fa94131fd..d2c599423e25 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)