elkowar / eww

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

[BUG] Window not hiding on hover lost #1134

Open QiangF opened 2 months ago

QiangF commented 2 months ago

Checklist before submitting an issue

Description of the bug

I am using a tiling window manager called herbstluftwm. I want the bar to show on mouse hover the bar area, and hide when the mouse is moved away. In the following configuration, the bar do show on mouse over, the window turns blank when the mouse is moved away, but the window stays where it is and not hiding!

Reproducing the issue

(defwidget bar []
           (box
            :class "bar bottom"
            :halign "start"
            :space-evenly false
            (workspaces)))

(defwidget workspaces []
           (box :class "workspaces"
                :orientation "h"
                :space-evenly true
                :halign "start"
                :spacing 10
                (button :onclick "wmctrl -s 0" 1)
                (button :onclick "wmctrl -s 1" 2)
                (button :onclick "wmctrl -s 2" 3)
                (button :onclick "wmctrl -s 3" 4)
                (button :onclick "wmctrl -s 4" 5)
                (button :onclick "wmctrl -s 5" 6)
                (button :onclick "wmctrl -s 6" 7)
                (button :onclick "wmctrl -s 7" 8)
                (button :onclick "wmctrl -s 8" 9)))

(defvar show_bar false)
(defwindow bar
           :monitor "<primary>"
           :geometry (geometry
                      :y "0px"
                      :width "100%"
                      :height "1px"
                      :anchor "bottom center")
           :stacking "fg"
           :wm-ignore false
           (eventbox
            :halign "start"
            :onhover "${EWW_CMD} update show_bar=true"
            :onhoverlost "${EWW_CMD} update show_bar=false"
            (revealer
             :transition "slideup"
             :reveal show_bar
             :duration "350ms"
             (bar))))

Expected behaviour

The bar is expected to totally disappear on hover lost.

Additional context

No response

fabolous005 commented 3 weeks ago

Works flawless for me on latest version.