[empathy] empathy_window_present: use _NET_WM_USER_TIME only has a fallback



commit 4d2d5a1622f93b69af195d7e3c4d4cb424dbec6e
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Mar 11 14:52:59 2010 +0100

    empathy_window_present: use _NET_WM_USER_TIME only has a fallback

 libempathy-gtk/empathy-ui-utils.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index b8980a0..4503a39 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1410,7 +1410,11 @@ empathy_window_present (GtkWindow *window)
 			gtk_widget_hide (GTK_WIDGET (window));
 	}
 
-	timestamp = gdk_x11_display_get_user_time (gdk_display_get_default ());
+	timestamp = gtk_get_current_event_time ();
+	if (timestamp == 0)
+		/* No event, fallback to _NET_WM_USER_TIME */
+		timestamp = gdk_x11_display_get_user_time (gdk_display_get_default ());
+
 	gtk_window_present_with_time (window, timestamp);
 	gtk_window_set_skip_taskbar_hint (window, FALSE);
 	gtk_window_deiconify (window);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]