flashfocus icon indicating copy to clipboard operation
flashfocus copied to clipboard

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

Open dimeritium-foil opened this issue 6 years ago • 9 comments

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.

dimeritium-foil avatar Nov 10 '19 17:11 dimeritium-foil

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 :)

fennerm avatar Nov 11 '19 06:11 fennerm

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 avatar Nov 15 '19 21:11 dimeritium-foil

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

dimeritium-foil avatar Nov 17 '19 00:11 dimeritium-foil

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

masaeedu avatar Nov 19 '19 23:11 masaeedu

@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.

dimeritium-foil avatar Nov 21 '19 00:11 dimeritium-foil

@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.

fennerm avatar Dec 15 '19 01:12 fennerm

@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

masaeedu avatar Dec 16 '19 17:12 masaeedu

@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 avatar Dec 18 '19 17:12 fennerm

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

fennerm avatar Dec 18 '19 17:12 fennerm