Replies: 11 comments 2 replies
-
Keyboard shortcuts that draws an OSD, like Gnome does for this scenario causes that OSD to steal the focus from Ulauncher, which then closes. This is the intended behavior when losing focus. I see why you wouldn't want it to in this instance, but I doubt it's even possible to make exceptions for specific OSDs. You could create a custom switcher without the OSD and map it to your current key combo: https://askubuntu.com/q/209597/420716, or if you always want to use English for Ulauncher for example, you could create a custom wrapper for |
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed answer @friday @toxaz sorry, I'm going to have to close this one as there's no feasible fix for it. |
Beta Was this translation helpful? Give feedback.
-
Could you please tell me the way to add wrapper to ulauncher-toggle? Should I clone the repo and rebuild the project? |
Beta Was this translation helpful? Give feedback.
-
Do you know how to write a shell script? You don't want to modify the original file since it will be overwritten by your package manager when Ulauncher updates. |
Beta Was this translation helpful? Give feedback.
-
If I'd need to switch layout before launching ulauncher, that'll be easy like
But I don't understand how to wrap a call to already running program. |
Beta Was this translation helpful? Give feedback.
-
You're not supposed to wrap Ulauncher, but
Restoring the old keyboard layout after closing Ulauncher is harder. You may have to write a loop and check that Ulauncher isn't the active window, then restore. For example |
Beta Was this translation helpful? Give feedback.
-
UPD: Won't work on ver. >5 For smb encountering the same issue.
|
Beta Was this translation helpful? Give feedback.
-
same here, but i need swith differents layout in ulauncher. def on_focus_out_event(self, widget, event):
# apparently Gtk doesn't provide a mechanism to tell if window is in focus
# this is a simple workaround to avoid hiding window
# when user hits Alt+key combination or changes input source, etc.
self.is_focused = False
t = threading.Timer(0.07, lambda: self.is_focused or self.hide())
t.start() to def on_focus_out_event(self, widget, event):
# apparently Gtk doesn't provide a mechanism to tell if window is in focus
# this is a simple workaround to avoid hiding window
# when user hits Alt+key combination or changes input source, etc.
self.is_focused = False
t = threading.Timer(.2, lambda: self.is_focused or self.hide())
t.start() and i can switch layout without blur event on ulauncher. |
Beta Was this translation helpful? Give feedback.
-
Has anyone solved this problem? Or maybe there are some launchers, that don't have it? |
Beta Was this translation helpful? Give feedback.
-
I don't think any launcher can solve this without making assumptions about the environment that won't hold everywhere (especially Wayland), using hacks or disabling the focus out handler completely.
Possible remaining options:
|
Beta Was this translation helpful? Give feedback.
-
I just added option 1 as an experimental setting in ec58ead There is no UI for it (because it's experimental). If you run from the v6 branch (will be in the next release after v6.0.0-beta11) and edit |
Beta Was this translation helpful? Give feedback.
-
Steps to reproduce
Current behavior
ulauncher window closes
Expected behavior
ulauncher window is still open waiting for input
Environment
Ulauncher version: 4.1.0.r1
Linux distro: Ubuntu 18.04 on X11
Desktop environment: gnome
Logs
Beta Was this translation helpful? Give feedback.
All reactions