Skip to content

Commit 83d382e

Browse files
committed
debugui: stop using hoverRoot at isCapturingInput
1 parent 3dfc000 commit 83d382e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

widget.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,16 @@ func (c *Context) isCapturingInput() bool {
169169
return false
170170
}
171171

172-
return c.hoverRoot != nil || c.focus != emptyWidgetID
172+
// Check whether the cursor is on any of the root containers.
173+
pt := c.pointingPosition()
174+
for _, cnt := range c.rootContainers {
175+
if pt.In(cnt.layout.Bounds) {
176+
return true
177+
}
178+
}
179+
180+
// Check whether there is a focused widget like a text field.
181+
return c.focus != emptyWidgetID
173182
}
174183

175184
// CurrentWidgetID returns the ID of the current widget being processed.

0 commit comments

Comments
 (0)