Firefox flatpak web apps group under browser icon on Plasma 6.8 - needs window identity prefixed

Abierto
#412 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
linux, python
Área
desktop

Línea de trabajo

Search the Python sources for StartupWMClass and the --class/--name arguments written into the generated .desktop file — that is where the Firefox flatpak app id prefix belongs. Then find the code that reads .desktop files back into the manager's list, which must accept the prefixed StartupWMClass instead of dropping the entry, and pick a place for migrating existing web apps. Done means a Firefox flatpak web app gets its own taskbar icon, still lists in the manager, and old web apps keep working.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Issue

Firefox flatpak web apps created with webapp-manager launch successfully, but their windows are grouped with the browser icon on the task manager (taskbar) rather than their own pinned icon.

Cause

As of Plasma 6.8, KWin's XdgToplevelWindow::handleAppIdChanged() replaces a sandboxed window's application ID with the sandbox application ID if the supplied ID does not start with that sandbox ID.

For example, a Discord web app uses:

  • --name WebApp-Discord####
  • --class WebApp-Discord####
  • StartupWMClass: WebApp-Discord####

This window identity is outside of the Firefox flatpak's namespace (org.mozilla.firefox), so KWin replaces it with org.mozilla.firefox. The task manager sees this as a regular Firefox window and groups the web app with the Firefox icon instead of the web app's own.

Source: https://github.com/KDE/kwin/blob/Plasma/6.8/src/xdgshellwindow.cpp#L847

Workaround

Prefixing the settings above with Firefox's application ID restores the web app's separate icon/grouping:

  • --name org.mozilla.firefox.WebApp-Discord####
  • --class org.mozilla.firefox.WebApp-Discord####
  • StartupWMClass: org.mozilla.firefox.WebApp-Discord####

I wasn't able to get this same workaround functioning with Chromium. It appears to have a related upstream issue: https://bugs.kde.org/show_bug.cgi?id=527431

Proposed Fix

For Firefox flatpak web apps, prefix the window identity settings with the application ID.

The manager application will also need to be updated to support the prefixed StartupWMClass, as changing this value currently causes the web app to disappear from the manager.

Consider migrating existing web apps (the .desktop filename and profile directory do not need to be changed).

Lenguaje dominante
Python
Estrellas
1k
Forks
132
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de linuxmint/webapp-manager

Todos los issues de linuxmint/webapp-manager

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.