GNOME Bugzilla – Bug 786427
[PATCH] about_dialog: set parent to a terminal window
Last modified: 2017-09-04 19:04:30 UTC
Created attachment 357818 [details] [review] 0001-about_dialog-set-parent-to-a-terminal-window.patch This helps to show the app name and icon for about dialogs in Wayland.
Duplicate of bug 786026 ? In any case, not using a transient parent is done on purpose, so you'll need to find a different fix.
Created attachment 357876 [details] [review] 0001-util-assign-about-dialog-to-the-application.patch (In reply to Christian Persch from comment #1) > Duplicate of bug 786026 ? > > In any case, not using a transient parent is done on purpose, so you'll need > to find a different fix. How about this?
That's a better idea :-) How about making that change in gtk+ (gtk+/gtk/gtkaboutdialog.c:gtk_show_about_dialog()), so as to fix every programme in one step, not just gnome-terminal?
(In reply to Christian Persch from comment #3) > That's a better idea :-) > > How about making that change in gtk+ > (gtk+/gtk/gtkaboutdialog.c:gtk_show_about_dialog()), so as to fix every > programme in one step, not just gnome-terminal? I would like to, but for programs that don't use GApplication, or have multiple applications, it's too hard to determine which app ID to use. Also, setting the application keeps it always alive because GTK+ reuses about dialogs, which may not be ideal for some programs.
Oh, so setting the "application" property holds the app, making this a not-solution for gnome-terminal too. Why exactly does gnome-shell not get the right title and/or icon for the about dialogue?
(In reply to Christian Persch from comment #5) > Oh, so setting the "application" property holds the app, making this a > not-solution for gnome-terminal too. For clarity, it only holds the gnome-terminal-server and there's no visual impact. > Why exactly does gnome-shell not get the right title and/or icon for the > about dialogue? To my (limited) knowledge, a window can't be associated with the application in Wayland just because it's started through a .desktop file. It has to set the ID to or match the process name with the filename of .desktop. https://git.gnome.org/browse/gnome-shell/tree/src/shell-window-tracker.c#n424 seems to handle the condition when neither matched, but it fails for Wayland.
(In reply to Xiang Fan from comment #6) > For clarity, it only holds the gnome-terminal-server and there's no visual > impact. That's still bad. However, the fix is simple: instead of using gtk_show_about_dialog(), just construct the dialogue yourself with g_object_new(GTK_TYPE_ABOUT_DIALOG, ....) and then gtk_window_present().
Created attachment 357938 [details] [review] 0001-util-assign-about-dialog-to-the-application.patch
I've committed a smaller patch, and that also takes care to destroy the dialogue when it's dismissed. This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.