elkowar / eww

ElKowars wacky widgets
https://elkowar.github.io/eww
MIT License
9.15k stars 380 forks source link

[BUG] swaync-client keeps popping up after click anywhere on bar #891

Open LamprosPitsillos opened 1 year ago

LamprosPitsillos commented 1 year ago

Checklist before submitting an issue

Description of the bug

I have set a widget to toggle the swaync-client panel on click. I toggles it , but then anywhere i click on the bar it keeps toggling. Similar to this bug from waybar :

https://github.com/Alexays/Waybar/issues/2115

Reproducing the issue

swaync config is the default config, nothing changed. eww widget is :

(defwidget notification []
    (box        
        :space-evenly "false"
        :orientation "h"  
        ;; :tooltip wifi-name
        (button     
            :onrightclick "scripts/notification dnd"
            :onclick "scripts/notification open"  ;;  swaync-client -t
            :class "icon notification-icon" notification_icon_p)))

Edited after update still persists: WM: Hyprland 91e28bbe9df85e2e94fbcc0137106362aea14ab5 EWW: eww 0.4.0 SWAYNC : swaync 0.9.0 OS: 23.11.20230825.5690c42 (Tapir)

Expected behaviour

only toggle panel when clicking on the button with the :on-click event handler

Additional context

No response

Sohail-XD commented 1 year ago

Same issue.

eviefp commented 8 months ago

FWIW, the workaround proposed in the waybar issue linked above seems to also work here. Adding a sleep before the command, like sleep 0.1; swaync-client -t seems to prevent this bug from surfacing.