Open bachrc opened 1 year ago
Same happens with me.
Could you guys test with another desktop environment or another window manager? I am pretty sure that's just another Gnome bug (or a restriction).
I had the same problem with archlinux Gnome 43.3, I tested it in a virtual machine with the Deepin desktop environment and found no such problem, I guess maybe it's a Gnome bug?
Additional, when I tested on Gnome, I found that if I don't do anything to the window, I have no problem getting focus at all, but if I open the window with a shortcut once, my mouse has any action in the window (click, scroll wheel), After I close the window, and the next time I open the window with a shortcut, getting focus fails.
I don't have any other DE, I cannot test on another one.
What could the Gnome bug be? I searched through the Gnome issue tracker, and I couldn't find something like this.
I am not sure if it is a bug or not but recently, I have seen more often than before that a lot of APIs stopped working on Gnome, for example, set_focus
and unminimize
and I am not sure if it is just a restriction imposed by the Window Manager in Gnome or straight up a bug but we are calling the right GTK methods so if they ever fix it, the fix will land in tauri automatically.
+1
I just found the same issue on KDE Plasma. Unlike Gnome, when I create a window using a shortcut key on the desktop in KDE, it can capture focus well. However, if the focus is on another window and I create a window using a shortcut key, this new window will not be able to capture focus. Hope this information helps.
I found that there is such an option in the KDE settings, the default is low, if it is set to none, it can solve this problem, I don't know if there is a similar setting under Gnome.
I found that there is such an option in the KDE settings, the default is low, if it is set to none, it can solve this problem, I don't know if there is a similar setting under Gnome.
this should be added to the docs somewhere I was looking for it for too long
Has anyone found a solution for Gnome?
Describe the bug
I am on Ubuntu 22.04, with GNOME on Xorg (because Tauri doesn’t support global shortcuts on wayland)
My app launches as a tray app.
I registered a global shortcut to show my window, and it works well. Though : the window does not have any focus. When the shortcut is triggered, i get my window, i make it .show(), and I make it .set_focus()… but it won’t. I must click on it to get my focus. Same with a tray item as a trigger.
Reproduction
Expected behavior
With a show(), the window is supposed to get the focus.
Platform and versions
Stack trace
No errors
Additional context
No response