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

commits at source.squeak.org commits at source.squeak.org
Thu May 5 13:21:17 UTC 2022


A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1985.mcz

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

Name: Morphic-ct.1985
Author: ct
Time: 5 May 2022, 3:21:05.588616 pm
UUID: 4412f1e1-911e-704c-b8a6-8e7cad7a312c
Ancestors: Morphic-mt.1984

Proposal to fix #defaultFocusMorph for tools like MessageNames by ignoring the nesting depth of submorphs.

See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-April/219806.html

For all tools I have tested so far, this does not introduce any overhead to the toolbuilding phase by more than 1%.

=============== Diff against Morphic-mt.1984 ===============

Item was changed:
  ----- Method: SystemWindow>>defaultFocusMorph (in category 'focus') -----
  defaultFocusMorph
  
  	| predicate |
  	predicate := (self hasProperty: #defaultFocusMorph)
  		ifFalse: [ [:morph | morph isLocked not and: [morph wantsKeyboardFocus]] ]
  		ifTrue: [ | anObject |
  			anObject := (self valueOfProperty: #defaultFocusMorph) value.
  			anObject isMorph ifTrue: [^ anObject].
  			[:morph | morph knownName = anObject] ].
  	
+ 	((self allMorphs select: predicate)
+ 		sorted: [:morph | morph positionInWorld y] ascending, [:morph | morph positionInWorld x] ascending)
+ 			at: 1 ifPresent: [:morph | ^ morph].
- 	self
- 		allMorphsBreadthFirstDo: [:morph | (predicate value: morph) ifTrue: [^ morph]]
- 		sorted: #top ascending, #left ascending.
  	
  	^ nil!



More information about the Squeak-dev mailing list