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

            Bug ID: 527633
           Summary: 6.8.1 regression: native Wayland applications launched
                    by Bottles are grouped under Bottles
    Classification: Plasma
           Product: kwin
      Version First 6.8.1
       Reported In:
          Platform: EndeavourOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

DESCRIPTION
After updating KWin from 6.8.0 to 6.8.1 on EndeavourOS, Windows programs
launched through Bottles Flatpak are grouped under the Bottles task-manager
icon instead of their own launchers. This affects native Wayland windows with
GE-Proton 11-11. The same applications still group correctly on XWayland.

STEPS TO REPRODUCE
1. Use Plasma Wayland with KWin 6.8.1 and Bottles Flatpak
(com.usebottles.bottles).
2. Launch Windows programs with their own desktop entries using GE-Proton 11-11
and Wine's native Wayland driver. Affected examples are ForcomPasswordEncoder
and Control Resonant.
3. Check their task-manager entries and window properties in KWin's debugger.

OBSERVED RESULT
The windows appear under Bottles. KWin reports:
resourceClass=com.usebottles.bottles
resourceName=wine64-preloader

EXPECTED RESULT
Each program should match its own launcher, as it did before the update.

WORKAROUND
Forcing the correct "Desktop file name" in a KWin window rule fixes an
individual application.

ADDITIONAL INFORMATION
The suspected change is 389d2360236e32ea60a7d664090f79d5294fae1b, in
XdgToplevelWindow::handleAppIdChanged():
https://invent.kde.org/plasma/kwin/-/merge_requests/10107
Original workaround for Discord activation:
https://invent.kde.org/plasma/kwin/-/merge_requests/10081

It replaces a client app_id outside the sandbox ID prefix with
securityContextAppId() before assigning resourceClass and desktopFileName. That
would give distinct programs inside Bottles the same identity. The original raw
set_app_id requests were not captured, so the debugger values alone do not
prove where the ID changed.

A local experimental patch preserves client IDs in window metadata and keeps
the sandbox fallback separately for activation and startup feedback. After
installing the patched 6.8.1 package and rebooting, I confirmed that the
affected programs group correctly again.

The patch was built on master and on 6.8.1. Five selected integration suites
passed on each build (224 passes, 0 failures, 9 existing skips, including
QtTest setup/cleanup). New cases cover distinct windows in one security
context, exported Plasma IDs, desktop-file rules, activation and startup
feedback. Discord activation was tested synthetically, not with the actual
Discord app. A merge request is pending access to KDE Invent.

SOFTWARE/OS VERSIONS
EndeavourOS x86_64; Plasma Wayland 6.8.1; KWin 6.8.1 (patched package 6.8.1-1.1
for the successful test); KDE Frameworks 6.31.0; Qt 6.12.0.

The code analysis, experimental patch, tests and report were prepared with AI
assistance. The desktop behavior before and after the patch was verified by me.

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

Reply via email to