fennerm / flashfocus

Simple focus animations for tiling window managers.
MIT License
748 stars 10 forks source link

Windows in focused workspace stop flashing when I restart i3-gaps #42

Open dimeritium-foil opened 4 years ago

dimeritium-foil commented 4 years ago

It only stops the flashing for the windows in the focused workspace, any other workspace is unaffected, which is circumvented by moving to an empty workspace before restarting. It's not a huge issue but I'm not sure if this is related to i3 or flashfocus, thank you.

fennerm commented 4 years ago

What happens if you restart flashfocus after restarting i3? Does this fix the issue or is the opacity still frozen?

I’ll see if I can reproduce as soon as I get some time. Thanks for reporting :)

dimeritium-foil commented 4 years ago

Hey sorry for the late reply, restarting flashfocus after restarting i3 does nothing, though flashing windows still work after restarting flashfocus by itself.

Edit: Restarting flashfocus right after restarting i3 still does nothing.

dimeritium-foil commented 4 years ago

Update: I found a workaround, I replaced the default i3 restart command with this lil script:

#!/bin/sh

workspace=$(i3-msg -t get_workspaces \
  | jq '.[] | select(.focused==true).name' \
  | cut -d"\"" -f2)

i3-msg workspace 99 && i3-msg restart && i3-msg workspace $workspace
masaeedu commented 4 years ago

@ffoil Sweet. Could you explain what this is doing (in particular the i3-msg workspace 99 bit)?

dimeritium-foil commented 4 years ago

@masaeedu Sure, it saves the currently active workspace to $workspace, then before restarting it switches to an empty workspace (could be any big random number that you aren't using in your workflow) so that there aren't any windows displayed when it restarts, which causes the issue. Then it returns to the previously active workspace.

fennerm commented 4 years ago

@ffoil I finally got a little time to look into this. Bad news is that compton seems to be the root cause here so I don't think we're going to get a fix for this any time soon. Good news is that the workspace goes back to normal if you restart compton.

masaeedu commented 4 years ago

@fennerm I've been trying to figure out the pattern for when this stops working and am not having much luck. I've noticed for example that if I start up some applications, then restart compton, and finally restart flashfocus, windows that are already focused won't flash on focus anymore (even though the log indicates flashfocus is attempting to change their opacity).

Windows that were created after flashfocus was started (even in the same workspace) flash correctly however.

See screen recording here: https://streamable.com/nci4y

fennerm commented 4 years ago

@masaeedu I’ve observed this also and have tried to figure out what’s going on without much luck before. iirc if you watch the _NET_WM_WINDOW_OPACITY property of the window it is being updated so flashfocus is doing it’s job. I don’t hold out much hope that I’ll get these fixed tbh but if anyone wants to take it on that would awesome!

fennerm commented 4 years ago

I’m sure this is not helpful to you but I will note that these issues seem to be absent in sway.