diff --git a/CHANGELOG.md b/CHANGELOG.md index 26fd457c76..4dd535b2f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ More detailed release notes can be found on the [releases page](https://github.c * Menu bar initially doesn't respond to mouse input on macOS (#505) * iOS: Missing CFBundleIconName and asset catalog (#1504) * CenterOnScreen causes crash on MacOS when called from goroutine (#1539) +* desktop.MouseHover Button state is not reliable (#1533) * Initial validation status in widget.Form is not respected diff --git a/driver/desktop/mouse.go b/driver/desktop/mouse.go index 4da43f7014..c130ad1b98 100644 --- a/driver/desktop/mouse.go +++ b/driver/desktop/mouse.go @@ -7,10 +7,7 @@ type MouseButton int const ( // LeftMouseButton is the most common mouse button - on some systems the only one - LeftMouseButton MouseButton = iota + 1 - - // TODO: Expose this button - // middleMouseButton + LeftMouseButton MouseButton = 1 << iota // RightMouseButton is the secondary button on most mouse input devices. RightMouseButton diff --git a/internal/driver/glfw/window.go b/internal/driver/glfw/window.go index ffbf25bdff..39c64418c2 100644 --- a/internal/driver/glfw/window.go +++ b/internal/driver/glfw/window.go @@ -682,9 +682,9 @@ func (w *window) mouseClicked(_ *glfw.Window, btn glfw.MouseButton, action glfw. } if action == glfw.Press { - w.mouseButton = button + w.mouseButton |= button } else if action == glfw.Release { - w.mouseButton = 0 + w.mouseButton &= ^button } if wid, ok := co.(fyne.Draggable); ok {