window: Don't send startup notifications for offscreen / popup windows
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 29 Jun 2015 21:16:49 +0000 (14:16 -0700)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 29 Jun 2015 21:26:45 +0000 (14:26 -0700)
The WM isn't aware of O-R (popup) or offscreen windows. If somebody
maps an offscreen or a popup GTK+ window before the main window, we'll
complete the sequence before a "real" window is mapped. Make sure to
ignore these for startup notifies.

gtk/gtkwindow.c

index ce24667c5fd2dedbdd26758b21a0af4cfa457199..add6b79dfdee9433400be47e78b6c59d742bd600 100644 (file)
@@ -6129,7 +6129,9 @@ gtk_window_map (GtkWidget *widget)
 
   gdk_window_show (gdk_window);
 
-  if (!disable_startup_notification)
+  if (!disable_startup_notification &&
+      !GTK_IS_OFFSCREEN_WINDOW (window) &&
+      priv->type != GTK_WINDOW_POPUP)
     {
       /* Do we have a custom startup-notification id? */
       if (priv->startup_id != NULL)