[Pkg] The Trunk: Morphic-mt.1414.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Apr 16 07:35:35 UTC 2018


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

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

Name: Morphic-mt.1414
Author: mt
Time: 16 April 2018, 9:35:16.658955 am
UUID: 2a24caed-3044-6745-a4dc-a12f474e7530
Ancestors: Morphic-cmm.1413

Preserve mouse focus after dialog invocation. For example, this fixes a rare bug concerning halo invocation (or dismissal).

=============== Diff against Morphic-cmm.1413 ===============

Item was changed:
  ----- Method: DialogWindow>>getUserResponse (in category 'running') -----
  getUserResponse
  
  	| hand world |
  	(ProvideAnswerNotification signal: self message asString) 
  		ifNotNil: [:answer| 
  			^ answer = #default
  				ifTrue: [result]
  				ifFalse: [answer]].
  
  	self message ifEmpty: [messageMorph delete]. "Do not waste space."
  	self paneMorph submorphs ifEmpty: [self paneMorph delete]. "Do not waste space."
  	
  	hand := self currentHand.
  	world := self currentWorld.
  
  	self fullBounds.
  	self moveToPreferredPosition.
  	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 exclusive ifTrue: [hand newMouseFocus: self].
- 		hand newKeyboardFocus: self.
  
+ 			[self isInWorld] whileTrue:[world doOneSubCycle].
- 		[self isInWorld] whileTrue:[world doOneSubCycle].
  
+ 			hand newKeyboardFocus: priorKeyboardFocus.
+ 			hand newMouseFocus: priorMouseFocus]].
- 		hand newKeyboardFocus: priorKeyboardFocus.
- 		hand releaseMouseFocus].
  
  	^ result!



More information about the Packages mailing list