The Inbox: MorphicExtras-nice.368.mcz

[email protected]
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Nicolas Cellier uploaded a new version of MorphicExtras to project The Inbox:
http://source.squeak.org/inbox/MorphicExtras-nice.368.mcz

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

Name: MorphicExtras-nice.368
Author: nice
Time: 23 August 2026, 12:13:26.668152 pm
UUID: b4594cdd-648e-4e17-a17c-d9fea6030a6f
Ancestors: MorphicExtras-mt.367

changes related to Morphic-nice.2232

processEvents shall now answer whether any user activity took place in the last cycle or not.

WorldState canSurrenderToOS: is now unecessary and deprecated.

=============== Diff against MorphicExtras-mt.367 ===============

Item was changed:
  SystemOrganization addCategory: #'MorphicExtras-AdditionalMorphs'!
  SystemOrganization addCategory: #'MorphicExtras-AdditionalSupport'!
  SystemOrganization addCategory: #'MorphicExtras-AdditionalWidgets'!
  SystemOrganization addCategory: #'MorphicExtras-Books'!
  SystemOrganization addCategory: #'MorphicExtras-Demo'!
  SystemOrganization addCategory: #'MorphicExtras-Exceptions'!
  SystemOrganization addCategory: #'MorphicExtras-Flaps'!
+ SystemOrganization addCategory: #'MorphicExtras-Games'!
+ SystemOrganization addCategory: #'MorphicExtras-Games-Chess'!
+ SystemOrganization addCategory: #'MorphicExtras-Games-Chess960'!
  SystemOrganization addCategory: #'MorphicExtras-GeeMail'!
  SystemOrganization addCategory: #'MorphicExtras-Leds'!
  SystemOrganization addCategory: #'MorphicExtras-Navigators'!
  SystemOrganization addCategory: #'MorphicExtras-Palettes'!
  SystemOrganization addCategory: #'MorphicExtras-PartsBin'!
  SystemOrganization addCategory: #'MorphicExtras-Postscript Canvases'!
  SystemOrganization addCategory: #'MorphicExtras-Postscript Filters'!
  SystemOrganization addCategory: #'MorphicExtras-SoundInterface'!
  SystemOrganization addCategory: #'MorphicExtras-SqueakPage'!
  SystemOrganization addCategory: #'MorphicExtras-Support'!
  SystemOrganization addCategory: #'MorphicExtras-Text Support'!
  SystemOrganization addCategory: #'MorphicExtras-Undo'!
  SystemOrganization addCategory: #'MorphicExtras-WebCam'!
  SystemOrganization addCategory: #'MorphicExtras-Widgets'!
- SystemOrganization addCategory: #'MorphicExtras-Games'!
- SystemOrganization addCategory: #'MorphicExtras-Games-Chess'!
- SystemOrganization addCategory: #'MorphicExtras-Games-Chess960'!

Item was changed:
  ----- Method: HandMorphForReplay>>processEvents (in category 'event handling') -----
  processEvents
  	"Play back the next event"
  
  	| evt hadMouse hadAny tracker  |
+ 	suspended == true ifTrue: [^ false].
- 	suspended == true ifTrue: [^ self].
  	hadMouse := hadAny := false.
  	tracker := recorder objectTrackingEvents.
  	[(evt := recorder nextEventToPlay) isNil] whileFalse: 
  			[
  			((evt isMemberOf: MouseMoveEvent) and: [evt trail isNil]) ifTrue: [^ self].
  			tracker ifNotNil: [tracker currentEventTimeStamp: evt timeStamp].
  			evt type == #EOF 
  				ifTrue: 
  					[recorder pauseIn: self currentWorld.
+ 					^ true].
- 					^ self].
  			evt type == #startSound 
  				ifTrue: 
  					[recorder perhapsPlaySound: evt argument.
  					recorder synchronize.
+ 					^ true].
- 					^ self].
  			evt type == #startEventPlayback 
  				ifTrue: 
  					[evt argument launchPlayback.
  					recorder synchronize.
+ 					^ true].
- 					^ self].
  
  			evt type == #noteTheatreBounds 
  				ifTrue: 
  					["The argument holds the content rect --for now we don't make any use of that info in this form."
+ 					^ true].
- 					^ self].
  
  			evt isMouse ifTrue: [hadMouse := true].
  			(evt isMouse or: [evt isKeyboard]) 
  				ifTrue: 
  					[self handleEvent: (evt setHand: self) resetHandlerFields.
  					hadAny := true]].
  	(mouseClickState notNil and: [hadMouse not]) 
  		ifTrue: 
  			["No mouse events during this cycle. Make sure click states time out accordingly"
  
  			mouseClickState handleEvent: lastMouseEvent asMouseMove from: self].
  	hadAny 
  		ifFalse: 
  			["No pending events. Make sure z-order is up to date"
  
+ 			self mouseOverHandler processMouseOver: lastMouseEvent].
+ 	^hadAny!
- 			self mouseOverHandler processMouseOver: lastMouseEvent]!

Item was changed:
  ----- Method: RemoteHandMorph>>processEvents (in category 'event handling') -----
  processEvents
  	"Process user input events from the remote input devices."
  
+ 	| evt hadAny |
+ 	hadAny := false.
- 	| evt |
  	evt := self getNextRemoteEvent.
  	[evt notNil] whileTrue: 
+ 			[hadAny := true.
+ 			evt type == #worldExtent 
- 			[evt type == #worldExtent 
  				ifTrue: 
  					[remoteWorldExtent := evt argument.
+ 					^true].
- 					^self].
  			self handleEvent: evt.
+ 			evt := self getNextRemoteEvent].
+ 	^hadAny!
- 			evt := self getNextRemoteEvent]!

Item was changed:
  ----- Method: SketchEditorMorph>>mouseMove: (in category 'event handling') -----
  mouseMove: evt 
  	"In the middle of drawing a stroke.  6/11/97 19:51 tk"
  
  	| pt priorEvt |
- 	WorldState canSurrenderToOS: false.	"we want maximum responsiveness"
  	pt := evt cursorPoint.
  	priorEvt := self get: #lastEvent for: evt.
  	(priorEvt notNil and: [pt = priorEvt cursorPoint]) ifTrue: [^self].
  	self perform: (self getActionFor: evt) with: evt.
  	"Each action must do invalidRect:"
  	self 
  		set: #lastEvent
  		for: evt
  		to: evt.
  	false 
  		ifTrue: 
  			["So senders will find the things performed here"
  
  			self
  				paint: nil;
  				fill: nil;
  				erase: nil;
  				pickup: nil;
  				stamp: nil.
  			self
  				rect: nil;
  				ellipse: nil;
  				polygon: nil;
  				line: nil;
  				star: nil]!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.