[squeak-dev] The Inbox: Morphic-ct.1625.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Tue Feb 18 13:52:04 UTC 2020


Hi Christoph.

Addressed in Morphic-mt.1625. 

Note that "h owner" is dangerous because that can be anything you are not in control in this piece of code. Also, the focus holder was correct for this scenario. That's why I suspected the bug to be somewhere else and started debugging. Took me about 3 hours. -.-" It was related to mouse-over dispatching, which affects mouse-enter and mouse-leave events, which trigger the halo.

Best,
Marcel
Am 17.02.2020 17:11:38 schrieb commits at source.squeak.org <commits at source.squeak.org>:
Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1625.mcz

==================== Summary ====================

Name: Morphic-ct.1625
Author: ct
Time: 17 February 2020, 5:11:24.527432 pm
UUID: e4c9f15a-c480-d542-9ad3-20490c73e5f1
Ancestors: Morphic-mt.1623

Fixes broken balloon helps on halo handles

Please review.

=============== Diff against Morphic-mt.1623 ===============

Item was changed:
----- Method: Morph>>invokeHaloOrMove: (in category 'meta-actions') -----
invokeHaloOrMove: anEvent
"Special gestures (cmd-mouse on the Macintosh; Alt-mouse on Windows and Unix) allow a mouse-sensitive morph to be moved or bring up a halo for the morph."
| h tfm doNotDrag |
h := anEvent hand halo.
"Prevent wrap around halo transfers originating from throwing the event back in"
doNotDrag := false.
h ifNotNil:[
(h innerTarget == self) ifTrue:[doNotDrag := true].
(h innerTarget hasOwner: self) ifTrue:[doNotDrag := true].
(self hasOwner: h target) ifTrue:[doNotDrag := true]].

tfm := (self transformedFrom: nil) inverseTransformation.

"cmd-drag on flexed morphs works better this way"
h := self addHalo: (anEvent transformedBy: tfm).
h ifNil: [^ self].
doNotDrag ifTrue:[^self].
"Initiate drag transition if requested"
anEvent hand
waitForClicksOrDrag: h
event: (anEvent transformedBy: tfm)
selectors: { nil. nil. nil. #startDragTarget:. }
threshold: HandMorph dragThreshold.
"Pass focus explicitly here"
+ anEvent hand mouseFocus: h owner.
- anEvent hand newMouseFocus: h.
"Reset temporary cursors to make available halo interaction visible."
anEvent hand showTemporaryCursor: nil.!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200218/4762b37e/attachment.html>


More information about the Squeak-dev mailing list