'From etoys3.0 of 19 February 2008 [latest update: #1900] on 20 February 2008 at 12:41:20 pm'! "Change Set: suspendUI-bf Date: 20 February 2008 Author: Bert Freudenberg Suspend the UI process while not active (#2939)"! AbstractLauncher subclass: #SugarLauncher instanceVariableNames: 'process dbus buddies handlers sharedActivity ' classVariableNames: 'Current UISema ' poolDictionaries: '' category: 'Sugar'! !SugarLauncher methodsFor: 'commands' stamp: 'bf 2/20/2008 12:38'! active: aBoolean "Etoys activity received or lost focus" Preferences setPreference: #soundsEnabled toValue: aBoolean. aBoolean ifTrue: [ UISema ifNotNilDo: [:s | s signal]. ] ifFalse: [ SoundPlayer shutDown. SoundRecorder anyActive ifTrue: [SoundRecorder allSubInstancesDo: [:r | r stopRecording]]. VideoDevice shutDown: true. UISema ifNil: [UISema := Semaphore new]. UISema initSignals. WorldState addDeferredUIMessage: [UISema wait]. ]. ! !