sublime_text
sublime_text copied to clipboard
[linux/wayland] Opening file in Sublime doesn't activate/focus existing Sublime window
Description of the bug
When I open a file with ST under Wayland, regardless of the origin app where I initiate the open (file browser, terminal, etc),
- The file successfully opens ...
- ... but ST doesn't "activate". It stays unfocused, in the back. This is super annoying, as you expect to be able to type after ST opens your file 😕.
Screencast:
linux-wayland_sublime-fails-to-activate-window.webm
Steps to reproduce
- Start ST in safe mode
- Open a file with ST. For example:
- Click a .txt file in Nautilus
-
subl file.txt
in a terminal (with--safe-mode
added if running in safe mode, of course)
Expected behavior
In ST under Xorg, the ST window correctly "activates". It is focused, it is brought to the front, I can immediately type in it.
Actual behavior
In ST under Wayland, the ST window doesn't "activate". It is not focused, it is not brought to the front, I cannot immediately type in it (if I type, my keypresses are received by the app I was in before opening the file, e.g. Nautilus or my terminal).
Sublime Text build number
4168 (dev channel)
Operating system & version
Arch Linux, up-to-date as of 2023-12-17
(Linux) Desktop environment and/or window manager
GNOME Shell 45.2, Wayland 1.22.0
Additional information
This might be a duplicate of https://github.com/sublimehq/sublime_text/issues/5374 , but this bug is A. overly specific (my bug here exhibits a failure case not involving workspaces), and B. by a user no longer on GitHub. So, for clarity I preferred creating a new, clearer task, whose title & description I can clarify at will.
OpenGL context information
N/A, not OpenGL-related.
Blergh; not ST-specific.
I thought I had tested other apps, but I actually hadn't tested them in the same case of an already-running app being called to open a file.
Closing, looking if this is a general GNOME or Wayland problem.
EDIT a misconfiguration of mine, not specific to Sublime. See Arch Linux forums / [wayland/gnome] Opening file in already-running app fails to focus
Can this be reopened? As I have a the same issue...
KDE Neon on Wayland, with Plasma 6. https://bugs.kde.org/show_bug.cgi?id=482999
It revolves around proper implementation of xdg_activation_v1 Wayland protocol
@BenjaminSchaaf I thought that the issue here lied with GNOME/Wayland, but according to the above comment and KDE bug, Sublime Text actually lacks implementation of Wayland protocol xdg_activation_v1
, which feels confirmed by the fact that I couldn’t find a mention of it in ST / dev changelog. Correct?
Hope you can look into it. Thanks for Sublime.
Firstly, that's not how our changelog works. We use GTK3 which does implement the xdg_activation_v1
interface, but likely in a way that gets blocked by wayland security measures.