https://bugs.kde.org/show_bug.cgi?id=473881

            Bug ID: 473881
           Summary: False detect of "background activity" for Flatpak apps
    Classification: Plasma
           Product: xdg-desktop-portal-kde
           Version: 5.27.7
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: xalt7x.serv...@gmail.com
                CC: aleix...@kde.org, jgrul...@redhat.com, n...@kde.org
  Target Milestone: ---

Created attachment 161254
  --> https://bugs.kde.org/attachment.cgi?id=161254&action=edit
Screencast showing auto-close of Flatpak apps on Wayland and X11 sessions

SUMMARY
On Wayland session xdg-desktop-portal-kde  mistakenly detects that Flatpak app
as running in the background. Then it shows "special" notification. With many
popular Flatpak apps (e.g. org.libreoffice.LibreOffice, org.mozilla.firefox,
com.google.Chrome) dialog appears right after program launch.
Notification has "Find out more" button. if the user clicks on it, a dialog
will appear that will inform that app is running in the background so user need
to either "Allow" it or "Force quit". If user simple closes this dialog, action
"Force quit" will be chosen automatically and application will automatically
close as well. 
After subsequent launches, the program will close automatically in a few
second.
As  a workaround user needs to override "background" permission with some GUI
(like "Flatseal") or command
flatpak permission-set background background org.mozilla.firefox yes


STEPS TO REPRODUCE (also attached screencast)
1. Login into Wayland session (easier to reproduce)
2. Install some application from Flathub
flatpak install flathub org.mozilla.firefox
3. Launch installed app
flatpak run org.mozilla.firefox
4. Few seconds after launch notice notification about "Background activity"
5. Click "Find out more" button
6. See dialog with a question about "Background activity" and buttons "Allow",
"Force quit".
7. Close this dialog (application will be closed automatically)
8. Relaunch Flatpak application


OBSERVED RESULT
Application silently closes


EXPECTED RESULT
KDE Portal should not detect "Background activity for visible applications.
KDE Portal should not set "Background" permission if the user closes the dialog
and does not select any action,

SOFTWARE/OS VERSIONS
Linux: Fedora 38 Kinoite
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
As you can see from the screencast, on X11 session KDE Portal have far less
false detects of "Background activity".
However if permission "Background" is set as denied, apps on X11 session will
auto-close as well.

Related bugs:
https://bugs.kde.org/show_bug.cgi?id=466325
https://bugs.kde.org/show_bug.cgi?id=468805
https://github.com/flathub/org.libreoffice.LibreOffice/issues/249

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to