| Summary: | On Wayland, Kate doesn't prefer opening files in an instance on the current virtual desktop | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] kwayland-integration | Reporter: | Ahmad Samir <a.samirh78> |
| Component: | general | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | christoph, ehilton2931, kde, nicolas.fella, vlad.zahorodnii, xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Ahmad Samir
2021-12-26 13:03:30 UTC
I would consider this more an issue of the kwayland-integration. Or is there some replacement function for this? The fix will probably have to be somewhere in kwayland*, then we can use it in Kate. As of right now upstream Wayland has no concept of virtual desktops. That means that the existing virtual desktops in e.g. Plasma are completely compositor-defined and applications generally have no information about what desktop they are on. There may or may no come a Wayland protocol that allows this in the future, but as of right now this part of KWindowSystem can't reasonably be implemented on Wayland. That's why https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/72 renames it to make this explicit I don't know much about Wayland; so here is an observation, assuming there is a kate instance on the current virtual desktop, and focus stealing prevention is set to none: - Ctrl+Clicking in konsole opens the file in that kate instance and activates the window - From that konsole window, using `kate /path/to/some/file`, the file is opened in kate, but the window isn't activated, and the task manager highlights the kate window as requesting attention I've created a KWin script that mitigates this bug. It's not a complete fix as it requires that a Kate instance already be open on the workspace in question, but as long as an instance already exists files will open on the same workspace. I should also note that it works by giving Kate focus on workspace switch, so if you rely on a specific window gaining focus on workspace switch this may not work well for you. You can find it here: https://github.com/ehilton2931/kate-autofocus. I may get around to uploading it to the KDE store eventually, but there's some additional functionality for multi-monitor setups that I want to add first. Even with this mitigation, I do hope that this bug will be properly fixed before the X11 session is dropped. This is a key part of my workflow and while the script does mean this bug is no longer a showstopper for me, the need for a preexisting Kate instance is still annoying. |