squeak-smalltalk / squeak-object-memory

Issues and assets related to the Squeak object memory.
https://bugs.squeak.org
MIT License
11 stars 1 forks source link

[Morphic Event Handling] Only one mouseUp event is generated after releasing multiple buttons #75

Open LinqLover opened 1 year ago

LinqLover commented 1 year ago

Steps to reproduce:

Open a simple morph that implements #mouseDown: and #mouseUp::

Morph subclass: #TestMorphMouse
    instanceVariableNames: ''
    classVariableNames: ''
    poolDictionaries: ''
    category: 'as yet unclassified'!

!TestMorphMouse methodsFor: 'event handling' stamp: 'ct 11/26/2022 13:36'!
handlesMouseDown: evt ^ true! !

!TestMorphMouse methodsFor: 'event handling' stamp: 'ct 11/26/2022 13:36'!
mouseDown: evt

    Transcript showln: evt.! !

!TestMorphMouse methodsFor: 'event handling' stamp: 'ct 11/26/2022 13:36'!
mouseUp: evt

    Transcript showln: evt.! !

Perform the following events on the morph: red mouse button down, yellow mouse button down, red up, yellow up

Expected result in the transcript: mouseDown red, mouseDown yellow, mouseUp red, mouseUp yellow Actual result: mouseDown red, mouseDown red yellow, mouseUp red

The second mouseUp is missing!

First investigation shows that the VM seems to generate correct events, so this is likely a bug in MouseClickState.

In practice, this bug/limitation makes it impossible to implement mouse chording in Squeak.