feat(linux): fix overlay window visibility on KDE Plasma Wayland#183
Open
ochen1 wants to merge 1 commit intoOpenWhispr:mainfrom
Open
feat(linux): fix overlay window visibility on KDE Plasma Wayland#183ochen1 wants to merge 1 commit intoOpenWhispr:mainfrom
ochen1 wants to merge 1 commit intoOpenWhispr:mainfrom
Conversation
- Change window type to 'toolbar' for Linux to hide from Alt+Tab - Add setVisibleOnAllWorkspaces call for Linux in setupAlwaysOnTop - Create kdeIntegration.js helper for KDE Plasma Wayland support - Use KWin D-Bus scripting API to set onAllDesktops, skipSwitcher, skipTaskbar, skipPager on the overlay window - Auto-detect KDE environment and apply configuration after window creation - Support both Plasma 5 (qdbus) and Plasma 6 (qdbus6) - Update CLAUDE.md with KDE integration documentation
Collaborator
|
this is awesome thank you @ochen1 - will review asap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Written by Opus. Tested to work on KDE. Not tested for regressions in other environments.
Summary
toolbarwindow typeProblem
On KDE Plasma Wayland, the dictation overlay window had two issues:
setVisibleOnAllWorkspaces()API doesn't work properly on KDE Wayland, causing the overlay to disappear when switching virtual desktopsThese are known issues documented by other Electron applications:
setVisibleOnAllWorkspaceson Linux (especially KDE Wayland) causes windows to go into a "false popup" stateSolution
1. Window Type Change
Changed the window type from
normaltotoolbarfor Linux. Toolbar-type windows are excluded from Alt+Tab on most Linux compositors (GNOME, KDE, Sway, etc.).2. KWin Scripting Integration
Created a new
kdeIntegration.jshelper that uses KWin's D-Bus scripting API to configure the overlay window at runtime:XDG_CURRENT_DESKTOP,DESKTOP_SESSION, andKDE_FULL_SESSIONonAllDesktops = true- Visible on all virtual desktopsskipSwitcher = true- Hidden from Alt+TabskipTaskbar = true- Hidden from taskbarskipPager = true- Hidden from desktop pagerqdbus) and Plasma 6 (qdbus6)3. Standard Linux Fallback
Also added
window.setVisibleOnAllWorkspaces(true)in the Linux branch ofsetupAlwaysOnTop()for X11 and other Wayland compositors where the Electron API does work.Files Changed
src/helpers/windowConfig.jstoolbarfor Linux; addedsetVisibleOnAllWorkspacescallsrc/helpers/kdeIntegration.jsmain.jsCLAUDE.mdTesting
To test on KDE Plasma Wayland:
To verify KWin script execution, run with debug logging:
Look for
[KDEIntegration]log entries showing successful script execution.Notes
toolbarwindow type alone should handle Alt+Tab hiding