Skip to content

Commit 557cb3f

Browse files
authored
Fix pointer up outside glfw window (#90)
1 parent 6d11750 commit 557cb3f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

rendercanvas/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# This is the reference version number, to be bumped before each release.
1212
# The build system detects this definition when building a distribution.
13-
__version__ = "2.1.1"
13+
__version__ = "2.1.2"
1414

1515
# Allow using nearly the same code in different projects
1616
project_name = "rendercanvas"

rendercanvas/glfw.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,10 @@ def _on_mouse_button(self, window, but, action, mods):
450450
self._pointer_lock = False
451451
return
452452
elif not self._pointer_inside:
453-
# This press is to select the window (regaining focus)
454-
self._pointer_lock = True
455-
return
453+
if action == glfw.PRESS:
454+
# This press is to select the window (regaining focus)
455+
self._pointer_lock = True
456+
return
456457

457458
if action == glfw.PRESS:
458459
event_type = "pointer_down"

0 commit comments

Comments
 (0)