Summary: | Ability to give fake focus to window [feature request] | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kwindowsystem | Reporter: | Andrew Shark <ashark> |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED INTENTIONAL | ||
Severity: | normal | CC: | kde |
Priority: | NOR | ||
Version: | 5.83.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Andrew Shark
2021-07-04 15:58:13 UTC
I don't see how we can. Xorg can only have one window as the focussed window. Ultimately if you want a client app to have different behaviour, you're better of changing the client app. Edit - I just remembered there is one solution that I use for debugging when I need a client to have focus. Start Xephyr or a nested wayland. Spawn the app inside that. Xephyr or our compositor might lose focus, but they tend not to forward it. It's too niche to do at a kwin level though. Thank you for the answer, but could you please provide some info? > Xorg can only have one window as the focussed window. How does the requesting mechanism work? Does window asks X11 that it has focus or does it asks kwin for that info? If X11, then may it work with wayland? > Ultimately if you want a client app to have different behaviour, you're better of changing the client app. Of course, but the apps we speak about are not open source (games and davinci resolve video editor), so no way with this way. On X11 kwin tells X who should have focus, clients look to X to be told who has focus.
> If X11, then may it work with wayland?
Arguably it could be done differently on wayland
Actually, I needed such thing several times, additionally to the case described originally with the D:BH game. I just wanted to document that, probably, there may be other cases, so maybe this eventually could be considered to implement. Here is my case. I have a video and I want to make its translated version. I want to transcript it first. I know there is a feature in google docs, that gives you speech to text function. I want to turn on the video and then swith the source for the audio stream from the output of video (like a virtual microphone). In pavucontrol I could go to recording tab and change the from source. BUT the problem is that as long as I alt-tab from chromium window to pavucontrol window, microphone becomes deactivated in the google docs. So recording application (browser) disappears from pavucontrol. If the feature was implemented, I could just keep a fake focus in browser, and alt-tab to pavucontrol, then change mic source. |