The Trunk: Tools-mt.958.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-mt.958.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.958.mcz

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

Name: Tools-mt.958
Author: mt
Time: 15 April 2020, 5:55:35.334699 pm
UUID: 8d488e07-f7e5-5a47-9861-a23cb62b6871
Ancestors: Tools-mt.957

For MVC projects, fixes high CPU load during menu invocation.

Note that #controlActivity is only used when PopUpMenu is invoked from within an MVC project. Yes, we should clean up this part in the future.

Complements ST80-mt.251.

=============== Diff against Tools-mt.957 ===============

Item was changed:
  ----- Method: PopUpMenu>>controlActivity (in category 'basic control sequence') -----
  controlActivity
  "Do whatever a menu must do - now with keyboard support."
 
  | didNotMove downPos |
  didNotMove := true.
  Sensor anyButtonPressed
  ifFalse:
  [didNotMove := false.
  Sensor waitButtonOrKeyboard].
+
-
  Sensor keyboardPressed ifFalse: [self manageMarker].
  (didNotMove and: [selection = 0])
  ifTrue:
  [downPos := Sensor cursorPoint.
  [didNotMove and: [Sensor anyButtonPressed]]
  whileTrue:
+ [ Project current world activeController interActivityPause.
+ (downPos dist: Sensor cursorPoint) < 2 ifFalse: [didNotMove := false]].
- [(downPos dist: Sensor cursorPoint) < 2 ifFalse: [didNotMove := false]].
  didNotMove ifTrue: [Sensor waitButtonOrKeyboard]].
 
  [Sensor keyboardPressed] whileTrue:
  [self readKeyboard ifTrue: [^ self].
  Sensor waitButtonOrKeyboard].
 
+ [Sensor anyButtonPressed] whileTrue: [
+ ScheduledControllers activeController interActivityPause.
+ self manageMarker]!
- [Sensor anyButtonPressed] whileTrue: [self manageMarker]!