flashfocus
flashfocus copied to clipboard
Sometimes windows don't flash IF they gained focus because another window was closed.
It flashes like 50% of the time, but when it doesn't, it'll flash if you click anywhere in it, which is kinda annoying. Here's a screen recording showing it.
I'm using bspwm, didn't test on anything else.
Also trying to run it in debug mode with -d or --debug makes it crash with this output:
$ flashfocus -d
INFO:root:Initializing with parameters:
INFO:root:{'debug': True, 'simple': False, 'ntimepoints': 10, 'time': 0.5, 'default_opacity': 1.0, 'opacity': 0.8}
INFO:root:Computing flash series from 0.8 to 1.0
INFO:root:Computed flash series = [0.8, 0.8200000000000001, 0.8400000000000001, 0.86, 0.88, 0.9, 0.92, 0.94, 0.96, 0.98]
INFO:root:FlashServer attributes: {'locked_windows': set(), 'flasher': <flashfocus.server.Flasher object at 0x7f90fde392e8>, 'prev_focus': None, 'producers': [<Thread(Thread-1, initial)>, <Thread(Thread-2, initial)>], 'target_windows': <queue.Queue object at 0x7f90faab3ac8>, 'xconn': <flashfocus.xutil.XConnection object at 0x7f90faab3ba8>, 'sock': <socket.socket fd=7, family=AddressFamily.AF_UNIX, type=2050, proto=0, laddr=/run/user/1000/flashfocus_socket>, 'keep_going': True}
Thanks for filing this issue. Just to confirm that I'm understanding you, this is only occurring when you close a window correct?
Could you possibly generate a logfile for me? To do so, make sure that no other flashfocus instance is running, then run flashfocus 2> debug.log. It would be ideal if you could get the bug to occur while you're logging.
Oh also, does bspwm automatically switch your focus when you close windows?
this is only occurring when you close a window correct?
Oh also, does bspwm automatically switch your focus when you close windows?
Yes & Yes.
Here's a log and here's a recording of the output as the bug happens. Thanks for the quick response, btw.
Okay, I apologise for spamming recordings but I got a weird message in the output while messing around, Hopefully it's useful.
Thanks for the detailed info! I think I know whats going on. Working on a fix now, I'll let you know when its up.
So I fixed the uncaught exception but I think its probably a red herring.
I failed to reproduce with a stock bspwm setup on my machine. It seems like for whatever reason, the _NET_ACTIVE_WINDOW property isn't getting updated when you close windows sometimes, so flashfocus can't detect that you shifted focus.
Hard to debug from here but a couple of possibilities off the top of my head:
- You have something weird in your config.
- There's some latency/bug in Xorg or bspwm which is causing _NET_ACTIVE_WINDOW to not get updated occasionally.
If you want to pursue this further, I'd advise making sure you're fully updated, then trying again with default compton + bspwm config files.
Thanks :)
Okay, you're right, it's not happening with stock configs. I managed to trace it down to a single option in my bspwm config: bspc config focus_follows_pointer true It only happens when that option is on (even if you don't touch the mouse at all) If you enable that on a stock config, it starts happening. Unfortunately though, I don't think I can live without that option. Thanks for your help.
Interesting, thanks for tracking that down. I'll look into this a bit, this seems like a weird and perhaps unintended behaviour on bspwm's part.