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

commits at source.squeak.org commits at source.squeak.org
Wed Sep 20 18:17:31 UTC 2017

Marcel Taeumel uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-mt.1350
Author: mt
Time: 20 September 2017, 8:17:14.164191 pm
UUID: a858e498-8304-9c48-a4d8-06e6fc226960
Ancestors: Morphic-tpr.1349

Fixes a mouse-focus bug that has revealed itself in the score player morph when changing the instruments for the tracks.

Actually, we cannot just save/restore the moues focus for this modal dialog invocation. If that invocation comes after a mouse-down, it will mess up Morphic's assumption that there will be a mouse-up to clear the focus, which already happened in the above case.

=============== Diff against Morphic-tpr.1349 ===============

Item was changed:
  ----- Method: DialogWindow>>getUserResponse (in category 'running') -----
  	| 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 center: preferredPosition.
  	self bounds: (self bounds translatedToBeWithin: world bounds).
  	self openInWorld: world.
  	hand keyboardFocus in: [:priorKeyboardFocus |
+ 		self exclusive ifTrue: [hand newMouseFocus: self].
+ 		hand newKeyboardFocus: self.
- 		hand mouseFocus in: [:priorMouseFocus |
- 			self exclusive ifTrue: [hand newMouseFocus: self].
- 			hand newKeyboardFocus: self.
+ 		[self isInWorld] whileTrue:[world doOneSubCycle].
- 			[self isInWorld] whileTrue:[world doOneSubCycle].
+ 		hand newKeyboardFocus: priorKeyboardFocus.
+ 		hand releaseMouseFocus].
- 			hand newKeyboardFocus: priorKeyboardFocus.
- 			self exclusive ifTrue: [
- 				hand newMouseFocus: priorMouseFocus]]].
  	^ result!

More information about the Squeak-dev mailing list