[BUG] Multiple windows opening on hot reload
Checklist before submitting an issue
- [x] I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
- [x] I have specifically verified that this bug is not a common user error
- [x] I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)
Description of the bug
I am using the default config to create an example window for wayland (hyprland):
(defwindow toolbar :monitor '["eDP-1"]' :geometry (geometry :x "0%" :y "1%" :width "99%" :height "30px" :anchor "top center") :stacking "fg" :exclusive true :focusable "none" "Test Toolbar")
The problem is that when i save, a new window gets created and the old one does not close, also, if i set focusable to ondemand, the keyboard focus moves to the new window and won't let me switch back to the editor.
Reproducing the issue
Put this config on <user_home>/.config/eww/eww.yuck:
(defwindow toolbar :monitor '["eDP-1"]' :geometry (geometry :x "0%" :y "1%" :width "99%" :height "30px" :anchor "top center") :stacking "fg" :exclusive true :focusable "none" "Test Toolbar")
and then start the eww daemon and open the window, then edit the file and save it.
Expected behaviour
Old window should close and only the new window should remain
Additional context
No response
Platform and environment
Wayland (Hyprland), and eww commit 5b4cc3e7a8055afb758421f4a114ef4032806e39
me too but im on x11
Could you check if this still happens with the fix provided in https://github.com/elkowar/eww/pull/1296?
@elkowar can confirm it does not happen with that fix
This also reproduced when the (S)CSS is updated. Current workaround is to restart the daemon to close all the windows, but the chances are 90% and the windows might still persist even though the daemon has been restarted.
https://github.com/user-attachments/assets/8d4785fe-6a46-4f46-9c0e-6d955d125d39
Its funny, cause along with hot reload sometimes two same windows open on just one eww open ... command even when I haven't changed anything in the config. Happens more when my computer is under pressure. Only one of these windows can be closed with eww close ... the other one is just there fixed unless I refresh the whole daemon.