elkowar / eww

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

[BUG] eww update inconsistent times (or i am dumb) #774

Open SpomJ opened 1 year ago

SpomJ commented 1 year ago

Checklist before submitting an issue

Description of the bug

there's a widget with something like (eventbox :onhover "eww update a=true" :onhoverlost "eww update a=false"). Sometimes quickly passing by results in a=true even when it's not hovered anymore (requires some time to get working, often does that at 32x32 size in my setup).

How do I know its eww update bug? when you append & notify send (a or b, depending where it is), it works correctly (could be wrong, if it is not please reply)

Reproducing the issue

something like

(defvar test false)
(defwidget test_widget[]
  (eventbox :width 32 :height 32
    :onhover "eww update test=true & notify-send hover"
    :onhoverlost "eww update test=false & notify-send hoverlost" ;replace notify-send ... with whatever else quick and accessible way you find if you want
    :style {test ?"background: #FFFFFF" : "background: #000000"} ;to visualuze test var state
  )
)

It does not always work first try, but sometimes it does and it is really annoying

Expected behaviour

variable is always false when widget is not hovered

Additional context

Proposed solution:

queue updates so the ones were sent sooner will be updated sooner too.

^[If you are wondering, & launches command at the same time, && or ; does not]

musjj commented 1 year ago

Probably related to: https://github.com/elkowar/eww/issues/715 (again)

Check your eww logs, you can probably find timeout warnings there.

SpomJ commented 5 months ago

Check your eww logs, you can probably find timeout warnings there.

There are none actually, everything works fine. Maybe it's also caused by happening on a single frame, but idk