diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2015-02-27 17:47:58 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-28 20:18:40 +0000 |
commit | 69a80316f7da33e90e1006624466f52af524f1dc (patch) | |
tree | c2c8872452f26c44fb0cac33eec34956e076581e /vcl/unx | |
parent | 97eead6da3a6c1aac27cdb51fb9c11b7b1024a8e (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>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 05d5e4662127..aa98cf0579bd 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -1350,8 +1350,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); } @@ -1806,9 +1805,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 @@ -1833,9 +1830,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 ); @@ -2631,8 +2626,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) |