-
Notifications
You must be signed in to change notification settings - Fork 416
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
Mouse events are not passed to some windows when focus_follows_pointer is enabled #232
Comments
Thanks for the workaround, it seems to work. For me the issue arises simply by switching between two desktops with windows of different mouse styles ("X" and left-pointer). At some point after switching between desktops, the "X" mouse starts persisting in both desktops and has no affect on either until X11 is restarted. As OP notes, the keyboard continues to function fine. |
Actually I don't think the the workaround yields any improvement for me. I can pretty consistently trigger the issue by any interaction with my panel, which I have in the margin created by bspwm padding. |
My issues were resolved by recent updates, though I can't figure out which one(s). |
Ryneeveretts issue seems to be separate. There is no change in the original issue. Clicks are not passed to xfdesktop if focus_follows_pointer is set to true. |
Unfortunately, it is probably connected to the way the focus follows pointer is implemented. See #25 (comment) for the history of this feature. |
One place where this consistently shows up for me is when I’m trying to run a dock that has a workspace switcher bound to the mouse-wheel (e. g., docky; but the same thing could be observed when I tweaked the example lemonbar to bind the mouse wheel to switch desktops). Now when you keep the mouse wheel scrolling, at some point the desktops stop switching (meaning the dock doesn’t receive the button event anymore). The client will then only receive the events again once the pointer leaves and re-enters the dock window or bar. |
Another way to reproduce is to open a fresh desktop, start two terminals and run So, after clicking on the termite window, what I get is:
|
As I said before, this is expected and can't be fixed without changing the implementation of |
Same issue here, it's basically the same thing as @eigengrau experiences... I use mouse wheel on a panel to cycle workspaces, and it stops working if there is any window on that workspace (i.e. something receives focus). Trying to regain focus in panel using Perhaps this may be expected from programming point of view, but not from user experience which is hurt badly as it stands. |
Why is the motion recorder needed, isn't In i3, when the focus is changed with the keyboard, the cursor is moved to the center of the window. I'd say this is expected behavior. |
@rr- Agreed: a wm shouldn't get in the way of the user. |
It should be fixed as of 56895ab. |
It works! You are the best! 👍 Thank you. (And I don't notice anything weird about focusing windows with keyboard either.) |
This is beyond awesome! Thank you! |
Yes, it seems to have returned. Apparently the fix broke too many other other important things. A pity. |
Perhaps this could serve as an encouragement for writing test suite like the one in i3. |
Most of the people seem to be affected by this issue only when using some kind of workspace switcher. For this purpose, rather than coming up with a complex solution that might break irrelevant stuff like it happened the other day, perhaps it would be sufficient to create a separate command that re-focuses the window under the cursor? It would be suitable for scripting purposes (so that people could fire that command after running |
@Chrysostomus Have you tried this:
|
Initial attempts have been unsuccesful, but in theory that should work. The downside is that it forces the use of focus_follows_pointer afterwards (which is not really a issue for personal use, but might need a workaround since I'm trying to make a bspwm respin for a distro). I'll try some variations to see if I can get it working. |
Okay, this is weird... |
I just figured why it does not work. If I have hotkey1: |
The issue with workaround seems to be same as this one: baskerville/sxhkd#20 |
I tried to pass clicks to the window under mouse with following script: This fails, because when focus_follows_pointer is off xdotool getmouselocation outputs last focused window instead off the one under cursor, and when it is on the click is not passed to the root window. |
I tried with bspc config focus_follows_pointer off; This prevents the loop, because script can only be run once a second and therefore fails on second run. Click is still not passed however, because sxhkd still graps the xdotool event. So instead of endless loop result is just failed script. The ~ in sxhkdrc makes the mouse button work as normal on windows it usually works, but the root window remains unipressed. Possible solutions that come to mind:
Anyway, I'm out of ideas how to work around this with scripting. |
@Chrysostomus to format the code, you can prefix it with four spaces like this:
using this would increase readability of the scripts you posted. |
@Chrysostomus I could toggle the grabbing state of all the bindings on SIGUSR2... |
Sounds interesting |
Please see if baskerville/sxhkd@ac09ffd helps (you can toggle the grabbing state with |
Toggling grabbing state with this command seems to work without problems. However, combination
still fails for some reason. It seems that click generated by clickpasser is still grabbed by sxhkd. I also tried with pkills inside the script, but it made no difference. I suspect it must be something with my syntax. |
works, but with 1s delay and only every other/third attempt. Maybe it has comething to do with duration of the pkill -USR2 -x sxhkd? If sending signal is faster than sxhkd reacting to it. |
With this script it works smoothly
called with this in sxhkd
Thank you very much for helping me with this! |
Issue effects at least xfce4-whiskermenu, xfdesktop and desktops drawn by nautilus and spacefm. Desktop items are not clickable and right click menu is unavailable. Whiskermenu can be interacted with through keyboard, but not through mouse.
Setting
bspc config focus_follows_pointer false
Removes all these issues. I haven't observed similar behavior with other windowmanagers with focus following mouse.
The text was updated successfully, but these errors were encountered: