Skip to content

Commit

Permalink
don't generate mouse back/fwd event on press
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Mar 13, 2024
1 parent 5ecd928 commit e8b6f75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/driver/glfw/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,9 @@ func (w *window) processMouseClicked(button desktop.MouseButton, action action,
}

if button == desktop.MouseButtonBack || button == desktop.MouseButtonForward {
if action == press {
return
}
if w.canvas.onMouseBack != nil && button == desktop.MouseButtonBack {
w.canvas.onMouseBack()
} else if w.canvas.onMouseForward != nil && button == desktop.MouseButtonForward {
Expand Down

0 comments on commit e8b6f75

Please sign in to comment.