eww icon indicating copy to clipboard operation
eww copied to clipboard

[BUG] button inside revealer doesn't work when combining with overlay and another widget

Open moetayuko opened this issue 2 years ago • 1 comments

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

It's hard to describe the issue, see comments in the MWE below. BTN starts working after commenting either the box or the label.

Reproducing the issue

(defvar rev false)

(defwindow test
  :geometry (
    geometry
    :anchor "center"
    :height "20%"
  )
  :stacking "fg"
  :monitor 0
(eventbox
    :onhover "${EWW_CMD} update rev=true &"
    :onhoverlost "${EWW_CMD} update rev=false &"
  (box
      :style "min-height: 13rem;min-width: 35rem;"
    (overlay
      (box ; BTN works if commenting this box
          :style "min-width: 35rem;min-height: 13rem;"
        )
      (box
        (label ; BTN works if commenting this label
            :text "label"
          )

        (revealer
            :reveal {rev}
          (button ; This button doesn't respond
            (label
                :text "BTN"
              )
            )
          )
        )
      )
    )
  )
)

Expected behaviour

BTN works normally

Additional context

No response

moetayuko avatar Aug 30 '23 10:08 moetayuko

As far as I have researched this problem, it seems like it is not an eww bug and rather a GTK bug. From what I can tell, it seems like revealer thinks it is not clickable as it is hidden behind a box and so does not enable the GAction of the button when its visibility changes. However, I do not know enough about the inner workings of GAction to track this down further.

luposmi avatar Sep 03 '23 10:09 luposmi