Skip to content

Commit

Permalink
bugfix: adding a quirk to the DesktopFileManager's resolution of gnom…
Browse files Browse the repository at this point in the history
…e-terminal-server
  • Loading branch information
mattkae committed Mar 4, 2024
1 parent bb4c938 commit ab7e8d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/server/frontend_wayland/desktop_file_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ namespace mf = mir::frontend;
namespace
{
const char* DESKTOP_FILE_POSTFIX = ".desktop";

const std::map<std::string, std::string> app_id_to_desktop_file_quirks = {
{"gnome-terminal-server", "org.gnome.Terminal.desktop"} // https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/8033
};
}

mf::DesktopFile::DesktopFile(const char* id, const char* wm_class, const char* exec)
Expand Down Expand Up @@ -55,6 +59,9 @@ std::string mf::DesktopFileManager::resolve_app_id(const scene::Surface* surface
if (app)
return app->id;

if (app_id_to_desktop_file_quirks.contains(app_id))
return app_id_to_desktop_file_quirks.at(app_id);

// Second, let's see if we can map it straight to a desktop file
auto desktop_file = app_id + DESKTOP_FILE_POSTFIX;
auto found = lookup_basename(desktop_file);
Expand Down

0 comments on commit ab7e8d2

Please sign in to comment.