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

commits at source.squeak.org commits at source.squeak.org
Sun Apr 5 10:09:54 UTC 2015


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

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

Name: Morphic-mt.824
Author: mt
Time: 5 April 2015, 12:09:24.055 pm
UUID: 7cb162d6-d4cc-7e44-803a-6f3a771bb701
Ancestors: Morphic-mt.823

Honor fast-dragging when the user does not hit the label but something from the system-windows's background.

=============== Diff against Morphic-mt.823 ===============

Item was changed:
  ----- Method: SystemWindow>>handlesMouseDown: (in category 'events') -----
  handlesMouseDown: evt 
- 	"If I am not the topWindow, then I will only respond to dragging by the title bar.
- 	Any other click will only bring me to the top"
  
+ 	^ true!
- 	^ self activeOnlyOnTop and: [self ~~ TopWindow]!

Item was changed:
  ----- Method: SystemWindow>>mouseDown: (in category 'events') -----
  mouseDown: evt
  
+ 	| wasActive |
+ 	(wasActive := self isActive) ifFalse: [
+ 		evt hand releaseKeyboardFocus.
- 	TopWindow == self ifFalse:
- 		[evt hand releaseKeyboardFocus.
  		self activate].
+ 
+ 	wasActive
+ 		ifFalse: [	
+ 			"the window was locked, thus we got the event.
+ 			re-send it now that the window is unlocked again"
+ 			evt wasHandled: false.
+ 			model windowActiveOnFirstClick
+ 				ifTrue: [self processEvent: evt] "re-dispatch to any submorphs"
+ 				ifFalse: [label processEvent: evt]. "dispatch to label so dragging works"
+ 			]
+ 		ifTrue: [
+ 			evt hand 
+ 				waitForClicksOrDrag: self 
+ 				event: evt 
+ 				selectors: { nil. nil. nil. #startDragFromLabel: }
+ 				threshold: HandMorph dragThreshold.
+ 			].
+ 	evt wasHandled: true.!
- 	
- 	"the window was locked, thus we got the event. re-send it now that the window is unlocked again"
- 	evt wasHandled: false.
- 	model windowActiveOnFirstClick
- 		ifTrue: [self processEvent: evt] "re-dispatch to any submorphs"
- 		ifFalse: [label processEvent: evt]. "dispatch to label so dragging works"
- 	evt wasHandled: true.
- !



More information about the Squeak-dev mailing list