[squeak-dev] The Inbox: Morphic-kfr.723.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jun 25 20:35:34 UTC 2014


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

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

Name: Morphic-kfr.723
Author: kfr
Time: 25 June 2014, 10:32:51.443 pm
UUID: 773d8298-086f-ce47-b8f2-de2b4ced346b
Ancestors: Morphic-kfr.722

Handling of mouse enter/leave action. Respect the Preferences mouseOverForKeyboardFocus

=============== Diff against Morphic-kfr.722 ===============

Item was changed:
+ ----- Method: PluggableListMorph>>mouseEnter: (in category 'events') -----
- ----- Method: PluggableListMorph>>mouseEnter: (in category 'event handling') -----
  mouseEnter: event
  	super mouseEnter: event.
  	self flag: #arNote. "remove this - keyboard input automatically goes right"
+ 	Preferences mouseOverForKeyboardFocus ifTrue:[
+ 	event hand newKeyboardFocus: self. ]!
- 	event hand newKeyboardFocus: self. !

Item was changed:
  ----- Method: PluggableListMorph>>mouseLeave: (in category 'events') -----
  mouseLeave: event
  	"The mouse has left the area of the receiver"
  
  	super mouseLeave: event.
+ 	Preferences mouseOverForKeyboardFocus ifTrue:[
+ 	event hand releaseKeyboardFocus: self]!
- 	event hand releaseKeyboardFocus: self!

Item was changed:
  ----- Method: PluggableTextMorph>>mouseEnter: (in category 'event handling') -----
  mouseEnter: event
  	super mouseEnter: event.
  	selectionInterval ifNotNil:
  		[textMorph editor selectInterval: selectionInterval; setEmphasisHere].
  	textMorph selectionChanged.
+ 	Preferences mouseOverForKeyboardFocus ifTrue:[
+ 	event hand newKeyboardFocus: textMorph]!
- 	event hand newKeyboardFocus: textMorph!

Item was changed:
  ----- Method: ScrollPane>>handlesMouseOver: (in category 'event handling') -----
  handlesMouseOver: evt
  	"Could just ^ true, but this ensures that scroll bars won't flop out
  	if you mouse-over appendages such as connecting pins."
  	self flag: #arNote. "I have no idea how the code below could've ever worked. If the receiver does not handle mouse over events then it should not receive any #mouseLeave if the mouse leaves the receiver for real. This is because 'evt cursorPoint' describes the *end* point of the movement and considering that the code would return false if the move ends outside the receiver the scroll bars should never pop back in again. Which is exactly what happens with the new event logic if you don't just ^true. I'm leaving the code in for reference - perhaps somebody can make sense from it; I sure cannot."
+ 	^true
-  ^Preferences mouseOverForKeyboardFocus
  "
  	| cp |
  	cp := evt cursorPoint.
  	(bounds containsPoint: cp)
  		ifTrue: [^ true]			
  		ifFalse: [self submorphsDo:
  					[:m | (m containsPoint: cp) ifTrue:
  							[m == scrollBar
  								ifTrue: [^ true]
  								ifFalse: [^ false]]].
  				^ false]
  "!



More information about the Squeak-dev mailing list