-
Notifications
You must be signed in to change notification settings - Fork 0
On Ubuntu, focus switching fails after closing a window #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
can you repro or prove this should work with any command line tools? |
Bumping, would love someone with native linux to confirm whether this affects other app focusing CLI tools. |
I have a guess what's going on here. Note that I wasn't calling focus on a Window object but on an App object, let's call it I'm guessing that when I call As for command line tools that do this on linux, wmctrl can focus a window belonging to a particular 'class', which seems to correspond to an application in practice. Eg The behavior I personally would prefer talon have is to focus the most recently used window of that application on the current desktop, which is the same behavior that pressing |
(edit: The issue turned out to be in my window manager, so this comment is safely ignorable) I'm experiencing something similar after windows are closed: (copying from this thread in the talon slack): I'm seeing buggy behavior with ui hooks under X11. I have the following python module: from talon import ui
def win_focus(window):
print(f'win_focus: {window.title}')def win_title(window):
print(f'win_title: {window.title}')ui.register('win_focus', win_focus)
ui.register('win_title', win_title) When I start up talon, I see all of the window focus events I expect and all of the window title events I expect. If I create a new window, I still get a window title event but not a window focus event. Then if I close a window, and the next window I open is the same type of window (close a shell then open a shell, or close a pavucontrol then open a pavucontrol) that new window will cause win_focus and win_title to not work when switching to or from that new window.I have not reproduced this behavior with new firefox windows, but I suspect that has to do with the fact that new windows from firefox are still owned by a process which is not actually closing or something? I'm not closing my main firefox window. But I'm not sure. |
should be fixed in latest beta, please reopen if you have another reproduction case |
does not appear to be fixed for me? Same reproduction: have an app w/ more than one window open, close the window (arranging things so that another window of the same app does not get focus afterwards), run on -393, ubuntu 20.04, default wm. |
same underlying cause, too: an active_window which does not exist. after reproing, run:
|
On Ubuntu 20.04.1, Talon beta 1532.
Problem:
focus SOME_APP
doesn't always focus SOME_APP.To reproduce: Have an app, let's assume firefox, with more than one window open. Focus one of those windows and close it. Make sure that when you do this, none of the apps' other windows come into focus - eg. by focusing some non-firefox window before you focus the firefox window to be closed, or by putting the other firefox windows on a different workspace. Now, say
focus firefox
. Alternatively, using the Talon repl, grab firefox directly fromui.apps()
and callfirefox.focus()
.Expected behavior: some firefox window gets focused.
Actual behavior: nothing.
I don't think this is because of focus stealing blocking, as I have disabled that using a gnome extension: https://extensions.gnome.org/extension/1005/focus-my-window/. Happy to debug this further if there is more info that would help.
The text was updated successfully, but these errors were encountered: