app: set a specific desktop filename to fix wayland window icon

Set a specific desktop filename to fix window icon under Wayland.

Closes: #13183
This commit is contained in:
Integral 2025-05-10 14:48:35 +08:00 committed by Jehan
parent 672703eb60
commit 95e32ebb34
3 changed files with 6 additions and 5 deletions

View file

@ -544,7 +544,6 @@ main (int argc,
GOptionContext *context; GOptionContext *context;
GError *error = NULL; GError *error = NULL;
const gchar *abort_message; const gchar *abort_message;
gchar *basename;
GFile *system_gimprc_file = NULL; GFile *system_gimprc_file = NULL;
GFile *user_gimprc_file = NULL; GFile *user_gimprc_file = NULL;
GOptionGroup *gimp_group = NULL; GOptionGroup *gimp_group = NULL;
@ -674,9 +673,7 @@ main (int argc,
argv = g_strdupv (argv); argv = g_strdupv (argv);
#endif #endif
basename = g_path_get_basename (argv[0]); g_set_prgname (GIMP_DESKTOP_NAME);
g_set_prgname (basename);
g_free (basename);
/* Check argv[] for "--verbose" first */ /* Check argv[] for "--verbose" first */
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++)

View file

@ -1,4 +1,4 @@
desktopfilename = 'gimp.desktop' desktopfilename = gimp_desktop_name + '.desktop'
desktop_conf = configuration_data() desktop_conf = configuration_data()
desktop_conf.set('GIMP_COMMAND', gimp_command) desktop_conf.set('GIMP_COMMAND', gimp_command)

View file

@ -79,6 +79,9 @@ so_version = '@0@.@1@.@2@'.format(lt_current - lt_age, lt_age, lt_revision)
gimp_command = 'gimp-' + gimp_app_version gimp_command = 'gimp-' + gimp_app_version
# A specific desktop name to fix window icon under Wayland
gimp_desktop_name = 'gimp'
gettext_package= 'gimp@0@@1@'.format(api_version_major, api_version_minor) gettext_package= 'gimp@0@@1@'.format(api_version_major, api_version_minor)
conf.set_quoted('GETTEXT_PACKAGE', gettext_package) conf.set_quoted('GETTEXT_PACKAGE', gettext_package)
@ -1648,6 +1651,7 @@ conf.set_quoted('GIMP_PACKAGE', meson.project_name())
conf.set_quoted('PACKAGE_NAME', meson.project_name()) conf.set_quoted('PACKAGE_NAME', meson.project_name())
conf.set_quoted('PACKAGE_STRING', package_string) conf.set_quoted('PACKAGE_STRING', package_string)
conf.set_quoted('GIMP_COMMAND', gimp_command) conf.set_quoted('GIMP_COMMAND', gimp_command)
conf.set_quoted('GIMP_DESKTOP_NAME', gimp_desktop_name)
# Versions # Versions
conf.set_quoted('GIMP_APP_VERSION_STRING',gimp_app_version) conf.set_quoted('GIMP_APP_VERSION_STRING',gimp_app_version)