]> git.0d.be Git - empathy.git/commitdiff
empathy_window_present: use _NET_WM_USER_TIME only has a fallback
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 11 Mar 2010 13:52:59 +0000 (14:52 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 15 Mar 2010 15:28:21 +0000 (16:28 +0100)
libempathy-gtk/empathy-ui-utils.c

index b8980a096a347e087add56bf0274155fc1dd402b..4503a39cc22f67f12cb613e3d1be4f55df183d46 100644 (file)
@@ -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);