GNOME Bugzilla – Bug 347375
Not possible to set startup notification ID on a GtkWindow
Last modified: 2007-03-13 17:09:31 UTC
In some cases, like transferring focus between multiple processes, one may want to set a startup notification id on a GTKWindow, or change one.
Created attachment 68850 [details] [review] GTK patches to add missing functions
Created attachment 68883 [details] [review] GTK patches to add missing functions Fixes incorrect X property format in the previous patch
Created attachment 70477 [details] [review] GTK patches to add missing functions Added code to handle "fake" startup-ids in the GTK side, since it is not acceptable in metacity
Created attachment 70574 [details] [review] GTK patches to add missing functions Various fixes for the previous patch, including setting the _NET_WM_USER_TIME from the startup-notification identifier
Created attachment 70681 [details] [review] GTK patches to add missing functions More fixes... :) User does not have to call gdk_notify_startup_complete manually now, provided startup-notification ID is passed from one application instance to another and set on window.
I probably should have posted a comment earlier. Anyway, FWIW, I read over the previous patches and pointed out to Vytas any potential issues I could see; the patch in comment 5 represents a version that has no bugs I could find.
Created attachment 84482 [details] [review] updated patch for trunk patch updated for trunk, with a complete changelog. this patch has been vetted by elijah: should we finally commit it?
patch applied to trunk. 2007-03-13 Emmanuele Bassi <ebassi@gnome.org> Apply patch by Vytautas Liuolia for changing the startup notification id on a window in the X11 backend. (#347375) * gdk/gdk.h: * gdk/gdkx.h: * gdk/x11/gdkdisplay-x11.c: Add gdk_notify_startup_complete_wit_id() and gdk_x11_display_get_startup_notification_id(). * gdk/gdkwindow.h: * gdk/x11/gdkwindow-x11.c: Add gdk_window_set_startup_id(). * gtk/gtkwindow.h: * gtk/gtkwindow.c: Add gtk_window_set_startup_id(), used to change the startup notification id. (gtk_window_class_init), (gtk_window_init), (gtk_window_set_property): Add write-only "startup-id" property to GtkWindow. (gtk_window_realize): Set the startup notification id on a GtkWindow if it's valid. (gtk_window_map): If we have another valid startup notification id then finish the notification process.