summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-04-07 15:39:00 +0200
committerAlexander Larsson <alexl@redhat.com>2009-04-07 15:39:00 +0200
commit5e0bd0c9bed0398f12a311ecd57a4bb36a1bbbf6 (patch)
tree558e02016402adc922494b5648e1a60758025888 /gtk
parent87459ff86c88469a752a09314db44526264de2f2 (diff)
downloadgtk+-5e0bd0c9bed0398f12a311ecd57a4bb36a1bbbf6.tar.gz
Set user_time from startup_id if window realized
For non-realized windows we set the user_time from the startup id on realization. However, if the window is already realized when the startup_id is not set we currently don't, but we should. (#573922)
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkwindow.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 4bbd53e0ce..1238c2295c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1500,18 +1500,21 @@ gtk_window_set_startup_id (GtkWindow *window,
g_free (priv->startup_id);
priv->startup_id = g_strdup (startup_id);
-
+
if (GTK_WIDGET_REALIZED (window))
{
+ guint32 timestamp = extract_time_from_startup_id (priv->startup_id);
+
+#ifdef GDK_WINDOWING_X11
+ if (timestamp != GDK_CURRENT_TIME)
+ gdk_x11_window_set_user_time (GTK_WIDGET (window)->window, timestamp);
+#endif
+
/* Here we differentiate real and "fake" startup notification IDs,
* constructed on purpose just to pass interaction timestamp
- */
+ */
if (startup_id_is_fake (priv->startup_id))
- {
- guint32 timestamp = extract_time_from_startup_id (priv->startup_id);
-
- gtk_window_present_with_time (window, timestamp);
- }
+ gtk_window_present_with_time (window, timestamp);
else
{
gdk_window_set_startup_id (GTK_WIDGET (window)->window,