[squeak-dev] The Inbox: ToolBuilder-Morphic-ct.278.mcz
marcel.taeumel at hpi.de
Tue Aug 24 11:54:33 UTC 2021
Hi Christoph --
Keyboard interactions should not force the user to figure out where the mouse cursor currently is.
Am 23.08.2021 17:05:19 schrieb commits at source.squeak.org <commits at source.squeak.org>:
A new version of ToolBuilder-Morphic was added to project The Inbox:
==================== Summary ====================
Time: 23 August 2021, 5:05:03.885565 pm
Proposal: When #openToolsAttachedToMouseCursor is enabled, always open tools under the hand.
I have been trying out this patch for several months in my image and overall found it very convenient for a number of reasons:
1. It feels much more familiar if tools *always* open under hand, not only sometimes (following some kind of, maybe non-straightforward, heuristic). The former #currentEvent hack was a nice idea but eventually, such as distinction was less intuitive for me.
2. The former #currentEvent hack does not always work: Already some time ago, I experienced a small number of situations where - after triggering a tool via keyboard - #currentEvent sent from #openAsTool already answered a newer mouse move event (maybe a threading issue? I never managed to trace this down). A more significant observation is that since #currentEvent is implemented as a dynamic variable , its return value is not always the same as the latest user event. You can see this in effect when you do-it the following via keyboard before loading this patch:
self inform: #foo.
(In this situation, one could argue that not opening the workspace under the cursor would be the right behavior because there is no current mouse event on the stack at this moment, but my intuition does not think so.)
3. If you have this preference enabled, you are probably a mouse user, and your next action after opening the tool will most likely be a mouse action anyway. Thus initially having the tool under hand does not harm, but it is a nice utility because you can immediately control the spatial arrangement without extra effort.
=============== Diff against ToolBuilder-Morphic-mt.277 ===============
Item was changed:
----- Method: SystemWindow>>openAsTool (in category '*ToolBuilder-Morphic-opening') -----
"Open this window as a tool, that is, honor the preferences such as #reuseWindows and #openToolsAttachedToMouseCursor."
| meOrSimilarWindow |
meOrSimilarWindow := self openInWorldExtent: self extent.
+ Project uiManager openToolsAttachedToMouseCursor
- (Project uiManager openToolsAttachedToMouseCursor
- and: [ | event |
- event := self currentEvent.
- event isMouse and: [event isMouseUp]])
meOrSimilarWindow setProperty: #initialDrop toValue: true.
meOrSimilarWindow hasDropShadow: false.
self currentHand attachMorph: meOrSimilarWindow].
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev