[squeak-dev] The Trunk: Morphic-mt.1761.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Apr 26 07:45:55 UTC 2021


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1761.mcz

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

Name: Morphic-mt.1761
Author: mt
Time: 26 April 2021, 9:45:48.321064 am
UUID: b6da97e8-f5a5-ac41-9880-5a0c0e547913
Ancestors: Morphic-mt.1760

Avoid reusing a window if it is the requesting window. This is useful for the "browse" button in the system browser or even for the "hierarchy" button in the hierarchy browser if the hierarchy is the same. A common yet simple way to duplicate a window without using a halo. Since this is an explicit user interaction, it is not expected to interfere with the "re-use windows" preference. I suppose. :-)

=============== Diff against Morphic-mt.1760 ===============

Item was changed:
  ----- Method: SystemWindow>>anyOpenWindowLikeMeIn: (in category 'open/close') -----
  anyOpenWindowLikeMeIn: aPasteUpMorph
+ 	
+ 	| requestor context |
+ 	self class reuseWindows ifFalse: [ ^ Array empty ].
+ 	context := thisContext sender.
+ 	[ context notNil and: [ requestor isNil ] ]
+ 		whileTrue: "Search for the requesting window to ignore it later."
+ 			[ | receiver window |
+ 			((receiver := context receiver) ~~ self
+ 				and: [ receiver isMorph
+ 				and: [ (window := receiver firstOwnerSuchThat: [ : m | m isSystemWindow ]) ~~ self
+ 				and: [ window notNil ] ] ])
+ 					ifTrue: [ requestor := window ]
+ 					ifFalse: [ context := context sender ] ].
+ 	^ self class
- 	self class reuseWindows ifFalse: [ ^Array empty ].
- 	^ SystemWindow
  		windowsIn: aPasteUpMorph 
  		satisfying: 
  			[ : each |
+ 			each ~~ requestor
+ 				and: [ each model class = self model class
- 			each model class = self model class
  				and: [ (each model respondsTo: #representsSameBrowseeAs:) 
+ 				and: [ each model representsSameBrowseeAs: self model ] ] ] ]
- 				and: [ each model representsSameBrowseeAs: self model ] ] ]
  !



More information about the Squeak-dev mailing list