-
-
Notifications
You must be signed in to change notification settings - Fork 652
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
Focus follows mouse in autofocus mode interacting with Sublime Text window #545
Comments
From researching this issue further it's clear there is alot of history to focus follows mouse in autofocus (instead of autoraise), these are some relevant links to check out: |
I assume that one of the synthesized events that yabai is generating to emulate the autofocus functionality observed through the WindowServer might actually be some kind of special mouse click event, and not all applications are capable of interpreting this special click event properly, which is why it will only work for some applications. There is very little information regarding autofocus on macOS out there; I believe yabai is actually the first software to achieve this for any modern version of OSX. The autoraise mode in yabai does not have these same kinds of issues, so maybe autoraise combined with |
This would be my guess as well. Looks like the event is specifically a |
@BenjaminSchaaf thank you for the response!
Yes everything works as expected; however, the console log is filed with error messages and I'd like to fix the problem.
Is this the kind that is implemented with a sublime plugin? Is there a configuration change I can make or is there a patch I can submit to the drag_select sublime command? |
The |
Right on @BenjaminSchaaf thank you creating an issue! There is a slight spelling mistake in the title: |
Should I keep this issue open or do you think it can be closed, as it is tracked at sublime? |
Not sure. I'd consider sending an input event with nan position a bug, but maybe that's the only way to safely do focus-follows-mouse on macOS. |
As far as I know there is actually no information out there on how to do autofocus on macOS except for what I did in yabai to achieve this, and so I don't think I will consider this a bug in yabai. At the very least I won't be looking more into it, because it is actually a pain and huge time sink. I will be closing this issue as I won't make changes here. If applications are having problems due to the usage of autofocus, switch to autoraise and enable topmost floating windows instead. |
Did a small change on master. Does that help? |
I upgraded yabai to version
This is my config file
|
I noticed that when focusing Sublime Text I'm getting this error message in the sublime text console:
I turned on debugging logging and found that whenever I click anywhere the drag_select command gets run:
When I turned off yabai and brought focus to sublime via things like clicking or alt-tabbing to the window there were no error messages.
I'm not sure about the internals of yabai or sublime but did some digging into the
window_manager_activate_window
function:yabai/src/window_manager.c
Lines 804 to 814 in 80273cb
I have a hunch that the error message might be related to some of the numbers that are in that table. The error seems innocuous but I would like to know what's causing it and fix it if possible.
Do you know what's the root cause?
I've also mentioned this issue on the sublime discussion board:
https://forum.sublimetext.com/t/unable-to-parse-command-drag-select/50438
This is my setup
The text was updated successfully, but these errors were encountered: