Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-10-13 02:06:22 +0300
committerCampbell Barton <campbell@blender.org>2022-10-13 02:10:26 +0300
commit3980af7453bfcf55dbf29a39475af17a6fcf897b (patch)
treea1eec68033c9f1d89993dc9a12333663b9f090b6
parenta481eb5576fc0a631f91d5feaec609faccf93973 (diff)
Fix T101779: Incorrect app_id on Wayland
Using the title as the app_id prevented the proper icon being used under KDE-Plasma.
-rw-r--r--intern/ghost/intern/GHOST_WindowWayland.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWayland.cpp b/intern/ghost/intern/GHOST_WindowWayland.cpp
index 62897b220b8..306739e5d78 100644
--- a/intern/ghost/intern/GHOST_WindowWayland.cpp
+++ b/intern/ghost/intern/GHOST_WindowWayland.cpp
@@ -497,6 +497,9 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system,
* when the `w->scale` changed. */
const int32_t size_min[2] = {320, 240};
+ /* This value is expected to match the base name of the `.desktop` file. see T101779. */
+ const char *xdg_app_id = "org.blender.Blender";
+
#ifdef WITH_GHOST_WAYLAND_LIBDECOR
if (use_libdecor) {
w->libdecor = new WGL_LibDecor_Window;
@@ -508,6 +511,7 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system,
libdecor_frame_map(w->libdecor->frame);
libdecor_frame_set_min_content_size(decor.frame, UNPACK2(size_min));
+ libdecor_frame_set_app_id(decor.frame, xdg_app_id);
if (parentWindow) {
WGL_LibDecor_Window &decor_parent =
@@ -524,6 +528,7 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system,
decor.toplevel = xdg_surface_get_toplevel(decor.surface);
xdg_toplevel_set_min_size(decor.toplevel, UNPACK2(size_min));
+ xdg_toplevel_set_app_id(decor.toplevel, xdg_app_id);
if (m_system->xdg_decor_manager()) {
decor.toplevel_decor = zxdg_decoration_manager_v1_get_toplevel_decoration(
@@ -636,7 +641,6 @@ void GHOST_WindowWayland::setTitle(const char *title)
#ifdef WITH_GHOST_WAYLAND_LIBDECOR
if (use_libdecor) {
WGL_LibDecor_Window &decor = *w->libdecor;
- libdecor_frame_set_app_id(decor.frame, title);
libdecor_frame_set_title(decor.frame, title);
}
else
@@ -644,7 +648,6 @@ void GHOST_WindowWayland::setTitle(const char *title)
{
WGL_XDG_Decor_Window &decor = *w->xdg_decor;
xdg_toplevel_set_title(decor.toplevel, title);
- xdg_toplevel_set_app_id(decor.toplevel, title);
}
this->title = title;