[etoys-dev] Etoys: OLPC-Display-bf.5.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jun 24 08:43:23 EDT 2012


Bert Freudenberg uploaded a new version of OLPC-Display to project Etoys:
http://source.squeak.org/etoys/OLPC-Display-bf.5.mcz

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

Name: OLPC-Display-bf.5
Author: bf
Time: 24 June 2012, 2:43:17 pm
UUID: d577cb94-9969-4d59-84e1-a38fb25ac0a3
Ancestors: OLPC-Display-yo.4

Protect virtual sensor against using a non-virtual display.

=============== Diff against OLPC-Display-yo.4 ===============

Item was changed:
  ----- Method: OLPCVirtualSensor>>primGetNextEvent: (in category 'accessing') -----
  primGetNextEvent: array
  	| scale offset |
  	super primGetNextEvent: array.
+ 	Display isVirtualScreen ifFalse: [^self].
  	"scale mouse events"
  	(array at: 1) = EventTypeMouse ifTrue:[
  		offset := Display displayOffset.
  		scale := Display displayScale.
  		array at: 3 put: ((array at: 3) - offset x * scale) truncated.
  		array at: 4 put: ((array at: 4) - offset y * scale) truncated.
  	].
  	(array at: 1) = EventTypeDragDropFiles ifTrue:[
  		scale := Display displayScale.
  		offset := Display displayOffset.
  		array at: 4 put: ((array at: 4) - offset x * scale) truncated.
  		array at: 5 put: ((array at: 5) - offset y * scale) truncated.
  	].!



More information about the etoys-dev mailing list