Skip to content

Send raw surface application_id in foreign toplevel app_id events#4955

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-application-id-handling
Draft

Send raw surface application_id in foreign toplevel app_id events#4955
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-application-id-handling

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

Related: #4946

What's new?

application_id handling was inconsistent: we stored the raw value but repeatedly resolved it to desktop-file-derived IDs at emission points. This change keeps app_id protocol output aligned with the surface’s actual application_id and stops overloading that field with desktop-file resolution.

  • Foreign toplevel app_id semantics

    • wlr-foreign-toplevel-management and ext-foreign-toplevel-list now emit raw surface->application_id() (and the observer callback’s application_id) directly.
    • Removed send-path calls to DesktopFileManager::resolve_app_id(...) in:
      • src/server/frontend_wayland/foreign_toplevel_manager_v1.cpp
      • src/server/frontend_wayland/foreign_toplevel_list_v1.cpp
  • Scope intentionally limited

    • No protocol additions in this PR.
    • DesktopFileManager resolution logic remains available for contexts that explicitly need desktop-file lookup.
// before
auto app_id = desktop_file_manager->resolve_app_id(surface);
handle.send_app_id_event(app_id);

// after
handle.send_app_id_event(application_id);

How to test

  • Verify that foreign toplevel app_id now matches the surface-set application_id exactly, including cases that previously mapped to desktop file IDs (e.g. gnome-terminal-server).
  • Verify update events after set_app_id propagate the exact value provided by the client.

Checklist

  • Tests added and pass
  • Adequate documentation added
  • (optional) Added Screenshots or videos

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Agent-Logs-Url: https://github.com/canonical/mir/sessions/bc00ca1f-9f3a-45ac-b37a-3d2b58fbe5eb

Co-authored-by: AlanGriffiths <9048879+AlanGriffiths@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix handling of application_id for consistency Send raw surface application_id in foreign toplevel app_id events May 21, 2026
Copilot AI requested a review from AlanGriffiths May 21, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The handling of application_id is weird

2 participants