From: Guillaume Desmottes Date: Thu, 11 Mar 2010 13:52:59 +0000 (+0100) Subject: empathy_window_present: use _NET_WM_USER_TIME only has a fallback X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=4d2d5a1622f93b69af195d7e3c4d4cb424dbec6e;hp=f22c92022672a78bead49aa44947bc9380ebf2b8 empathy_window_present: use _NET_WM_USER_TIME only has a fallback --- diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c index b8980a09..4503a39c 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);