[BUG] Desktop (Linux/KDE Wayland): window sets demands-attention on every focus loss, pinning auto-hide panels open
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version
What's Wrong?
On KDE Plasma (Wayland), the Claude Desktop main window raises KWin'sdemandsAttention flag every time it loses focus, and holds it for as long as
the window stays unfocused. It clears only when the window is re-activated.
This has two user-visible consequences on a stock Plasma setup:
- Auto-hide panels never retract. A Task Manager applet reports
NeedsAttention to its containment while any of its tasks carries the flag,
and Plasma holds an auto-hide panel open for as long as its containment needs
attention. So the panel is pinned open the entire time Claude is backgrounded.
- The task icon is permanently highlighted, i.e. Claude appears to be
constantly asking for attention when nothing has happened.
Both clear the instant Claude is focused again, and both reappear on the next
focus loss. This is not tied to notifications, permission prompts, or any session
activity — it reproduces on an idle window with no session running.
What Should Happen?
The window should not request attention on ordinary focus loss. demandsAttention
should be raised only for genuine attention requests (permission prompt, idle
completion, AskUserQuestion), consistent with flashFrame being gated behind
the dockBounceEnabled setting.
Error Messages/Logs
KWin script probe output. ATTN-CHANGED lines are demandsAttentionChanged
transitions on the Claude window; ACTIVATED lines are workspace.windowActivated:
16:50:54 ACTIVATED systemsettings
16:50:54 ATTN-CHANGED class=com.anthropic.Claude attn=true active=false geom=0,29 1366x739
16:50:55 ACTIVATED firefox
16:50:55 STILL-ATTN class=com.anthropic.Claude attn=true active=false
16:50:56 ATTN-CHANGED class=com.anthropic.Claude attn=false active=false
16:50:56 ACTIVATED com.anthropic.Claude
16:50:57 ACTIVATED firefox
16:50:57 ATTN-CHANGED class=com.anthropic.Claude attn=true active=false
16:50:58 ATTN-CHANGED class=com.anthropic.Claude attn=false active=false
16:50:58 ACTIVATED com.anthropic.Claude
16:51:17 ACTIVATED systemsettings
16:51:17 ATTN-CHANGED class=com.anthropic.Claude attn=true active=false
16:51:27 ATTN-CHANGED class=com.anthropic.Claude attn=false active=false
16:51:27 ACTIVATED com.anthropic.Claude
The flag follows focus exactly: raised within a second of every blur, held for the
full 10s the window was backgrounded at 16:51:17, cleared on re-activation. No
other window in the session ever set it.
Steps to Reproduce
- On KDE Plasma 6 (Wayland), set the panel containing the Task Manager to
Auto Hide (panelVisibility=1).
- Open Claude Desktop and focus it. The panel hides normally.
- Alt+Tab to any other window.
- The panel slides open and stays open indefinitely; the Claude task icon shows
the attention highlight.
- Focus Claude again — the panel retracts and the highlight clears.
To confirm the flag directly, load this as a KWin script
(qdbus6 org.kde.KWin /Scripting org.kde.kwin.Scripting.loadScript <path> probe
then ... .start, output to journalctl --user):
function watch(w) {
if (w.demandsAttentionChanged) {
w.demandsAttentionChanged.connect(function () {
print("ATTN " + w.resourceClass + " attn=" + w.demandsAttention +
" active=" + w.active);
});
}
}
var l = workspace.windowList();
for (var i = 0; i < l.length; i++) { watch(l[i]); }
workspace.windowAdded.connect(watch);
Is this a regression?
I don't know — this is the first version I've run on this machine.
Claude Code Version
2.1.234 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
Environment
| | |
|---|---|
| Claude Desktop | 1.40609.0 (packaged as claude-desktop 1.40609.0-1, CachyOS, signed) |
| Electron | 42.10.0 |
| KDE Plasma / KWin | 6.7.4 |
| Session | Wayland (--ozone-platform=wayland) |
| Kernel | 7.1.8-1-cachyos |
| Panel | single applet, org.kde.plasma.icontasks, panelVisibility=1 |
Causes ruled out
- Not Electron's
flashFrame.requestUserAttention()gates it behind
dockBounceEnabled, which defaults to false and is not set anywhere in
~/.config/Claude.
- Not notification-driven. It reproduces deterministically on every blur of an
idle window with no session running, and notificationLevels is unset.
- The main window's
blurhandler that I could read in the bundle only toggles
the enabled state of the "Actual Size" menu item, so the call originates
elsewhere.
Workaround
A KWin script that clears the flag as soon as it appears. Installed at~/.local/share/kwin/scripts/claude-attention-fix/, enabled withkwriteconfig6 --file kwinrc --group Plugins --key claude-attention-fixEnabled true:
function guard(w) {
if (!w || w.resourceClass != "com.anthropic.Claude") {
return;
}
if (w.demandsAttention) {
w.demandsAttention = false;
}
if (w.demandsAttentionChanged) {
w.demandsAttentionChanged.connect(function () {
if (w.demandsAttention) {
w.demandsAttention = false;
}
});
}
}
var windows = workspace.windowList();
for (var i = 0; i < windows.length; i++) {
guard(windows[i]);
}
workspace.windowAdded.connect(guard);
This suppresses all attention requests from the app, so it is a mitigation rather
than a fix.
3 Comments
Follow-up: this is app-specific rather than generic Electron-on-Wayland — plus a repro caveat that will matter when you try to reproduce it.
1. It does not reproduce under programmatic activation
Driving focus from a KWin script (
workspace.activeWindow = w) never raised theflag once, across five switches. Only real user-driven Alt+Tab triggers it. A test
harness that calls
win.blur()or activates windows synthetically will not showthis bug.
2. Against VS Code on effectively the same Electron, the flag is Claude-only
| App | Electron |
|---|---|
| Claude Desktop 1.40609.0 | 42.10.0 |
| VS Code 1.133.0 | 42.8.0 |
Same compositor (KWin 6.7.4, Wayland), same session, same Alt+Tab switches, both
windows watched by a single probe:
Claude raised the flag on every blur and held it for the entire unfocused interval
(7s at both 17:12:38 and 17:12:52).
codenever raised it once — including at17:12:21 when it was itself blurred by another window. There are no
class=codeattention lines anywhere in the log.Since both apps run Electron 42 under the same compositor, this points at Claude
Desktop's own window handling rather than Chromium's Wayland backend.
The KWin mitigation from the original report was disabled for the entire
measurement, so it isn't masking anything here.
In Ubuntu (Gnome) with the "Dash to Panel" extension Claude Code desktop is barely unusable:
This happens constantly.
Related: #94061, #95995, #74914, #75905