[squeak-dev] The Inbox: Morphic-mt.1719.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jan 26 15:48:13 UTC 2021


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

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

Name: Morphic-mt.1719
Author: mt
Time: 26 January 2021, 4:48:07.757802 pm
UUID: 613d0cd1-c5b4-4baf-ae61-45025f85b4ea
Ancestors: Morphic-mt.1718

Quick experiment to improve discoverability of modal dialogs. (Might be too annoying when planning to close-confirm many windows in a row.)

=============== Diff against Morphic-mt.1718 ===============

Item was changed:
  ----- Method: DialogWindow>>getUserResponse (in category 'running') -----
  getUserResponse
  
+ 	| hand world shade |
- 	| hand world |
  	self message ifEmpty: [messageMorph delete]. "Do not waste space."
  	self paneMorph submorphs
  		ifEmpty: ["Do not waste space and avoid strange button-row wraps."
  			self paneMorph delete.
  			self buttonRowMorph wrapDirection: #none]. 
  	
  	hand := self currentHand.
  	world := self currentWorld.
  
  	self fullBounds.
  	self moveToPreferredPosition.
+ 	
+ 	self exclusive ifTrue: [
+ 		world addMorphFront: (shade := Morph new color: (Color black alpha: 0.5); bounds: world bounds; lock; yourself).
+ 		SystemWindow topWindow ifNotNil: #comeToFront].
  	self openInWorld: world.
  	
  	hand showTemporaryCursor: nil. "Since we are out of context, reset the cursor."
  	
  	hand keyboardFocus in: [:priorKeyboardFocus |
  		hand mouseFocus in: [:priorMouseFocus |
  			self exclusive ifTrue: [hand newMouseFocus: self].
  			hand newKeyboardFocus: self.
  
  			[[self isInWorld] whileTrue: [world doOneSubCycle]]
  				ifCurtailed: [self cancelDialog].
  
+ 			shade ifNotNil: #abandon.
  			hand newKeyboardFocus: priorKeyboardFocus.
  			
  			self flag: #discuss. "Since 2016 we are having this *ping pong* between (a) restoring the prior mouse focus and (b) just clearing it globally. The former solution makes more sense while the latter fixes issues with some modal dialogs. We have to investigate this further."
  			hand releaseMouseFocus.
  			"hand newMouseFocus: priorMouseFocus."]].
  
  	^ result!



More information about the Squeak-dev mailing list