Skip to content

Commit d8be1cb

Browse files
committed
debugui: bug fix: invisible popups should be skipped to detect hovering
1 parent 7e118ec commit d8be1cb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

widget.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,15 @@ func (c *Context) pointingOver(bounds image.Rectangle) bool {
4242
}
4343
currentRoot := c.currentRootContainer()
4444
for i := len(c.rootContainers) - 1; i >= 0; i-- {
45-
if p.In(c.rootContainers[i].layout.Bounds) {
46-
return c.rootContainers[i] == currentRoot
45+
cnt := c.rootContainers[i]
46+
if !cnt.open {
47+
if cnt == currentRoot {
48+
return false
49+
}
50+
continue
51+
}
52+
if p.In(cnt.layout.Bounds) {
53+
return cnt == currentRoot
4754
}
4855
}
4956
return false

0 commit comments

Comments
 (0)