diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-05-04 20:20:15 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-05-04 20:20:15 +0800 |
commit | bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0 (patch) | |
tree | 5104009c41478f4672ad3deab29c03b50e54df3b /libempathy-gtk/empathy-ui-utils.c | |
parent | 046792f3fd596574132fe1d6217dd1877bffe743 (diff) | |
parent | 61de8fbbea5d8d096aafcaa8c2b8093d0f349c87 (diff) | |
download | gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar.gz gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar.bz2 gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar.lz gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar.xz gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar.zst gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.zip |
Merge branch 'timestamp-615976'
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r-- | libempathy-gtk/empathy-ui-utils.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c index 3f37ea2db..2f06ae902 100644 --- a/libempathy-gtk/empathy-ui-utils.c +++ b/libempathy-gtk/empathy-ui-utils.c @@ -1392,10 +1392,10 @@ empathy_window_iconify (GtkWindow *window, GtkStatusIcon *status_icon) /* Takes care of moving the window to the current workspace. */ void -empathy_window_present (GtkWindow *window) +empathy_window_present_with_time (GtkWindow *window, + guint32 timestamp) { GdkWindow *gdk_window; - guint32 timestamp; g_return_if_fail (GTK_IS_WINDOW (window)); @@ -1417,25 +1417,17 @@ empathy_window_present (GtkWindow *window) gtk_widget_hide (GTK_WIDGET (window)); } - timestamp = gtk_get_current_event_time (); - if (timestamp == 0 && gdk_window != NULL) { - GdkEventMask mask; - - /* According to the documentation of gdk_x11_get_server_time - * GDK_PROPERTY_CHANGE_MASK needs to be set in its events otherwise a hang - * can occur. Be sure to at least temporarily set this mask */ - mask = gdk_window_get_events (gdk_window); - gdk_window_set_events (gdk_window, - mask | GDK_PROPERTY_CHANGE_MASK); - timestamp = gdk_x11_get_server_time (gdk_window); - gdk_window_set_events (gdk_window, mask); - } - gtk_window_present_with_time (window, timestamp); gtk_window_set_skip_taskbar_hint (window, FALSE); gtk_window_deiconify (window); } +void +empathy_window_present (GtkWindow *window) +{ + empathy_window_present_with_time (window, GDK_CURRENT_TIME); +} + GtkWindow * empathy_get_toplevel_window (GtkWidget *widget) { |