events |= runPaint ();
public boolean readAndDispatch () {	checkDevice ();	boolean events = false;	events |= runSettings ();	events |= runTimers ();	events |= runEnterExit ();	events |= runPopups ();	events |= runGrabs ();	int [] outEvent  = new int [1];	int status = OS.ReceiveNextEvent (0, null, OS.kEventDurationNoWait, true, outEvent);	if (status == OS.noErr) {		events = true;		int eventClass = OS.GetEventClass (outEvent [0]);		int eventKind = OS.GetEventKind (outEvent [0]);		OS.SendEventToEventTarget (outEvent [0], OS.GetEventDispatcherTarget ());		OS.ReleaseEvent (outEvent [0]);		/*		* Feature in the Macintosh.  HIComboBox does not send any		* notification when the selection changes.  The fix is to		* detect if the combo text has changed after every event		* has been dispatched.  This is only necessary when the		* combo has focus. 		*/		if (focusCombo != null && !focusCombo.isDisposed ()) {			focusCombo.checkSelection ();		}		/*		* Feature in the Macintosh.  When an indeterminate progress		* bar is running, it floods the event queue with messages in		* order to show the animation.  This means that async messages		* will never run because there are always messages from the		* operating system.  The fix is to run async messages when ever		* there is a wake message.		*		* NOTE:  This is not the correct behavior.  Operating system		* message are supposed to have priority over async messages.		*/		if (eventClass == WAKE_CLASS && eventKind == WAKE_KIND) {			runAsyncMessages (false);		}	}	if (events) {		runDeferredEvents ();		return true;	}	return runAsyncMessages (false);}