diff options
author | Silenio Quarti <silenio> | 2004-05-27 19:04:18 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2004-05-27 19:04:18 +0000 |
commit | facb4a58dee97a2ff960ee66661b66782b3014e2 (patch) | |
tree | f005f671cf6cdc2c2a7fe8afd82b98c7212631a0 | |
parent | 1be6164eaccd19b7a63e2c3b709d3a62b06d853c (diff) | |
download | eclipse.platform.swt-facb4a58dee97a2ff960ee66661b66782b3014e2.tar.gz eclipse.platform.swt-facb4a58dee97a2ff960ee66661b66782b3014e2.tar.xz eclipse.platform.swt-facb4a58dee97a2ff960ee66661b66782b3014e2.zip |
60816
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java index b50589eaa4..00c9dfb6de 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java @@ -2902,9 +2902,13 @@ boolean runGrabs () { int handle = grabControl.handle; int window = OS.GetControlOwner (handle); int port = OS.GetWindowPort (window); - OS.TrackMouseLocationWithOptions (port, OS.kTrackMouseLocationOptionDontConsumeMouseUp, OS.kEventDurationForever, outPt, outModifiers, outResult); + OS.TrackMouseLocationWithOptions (port, OS.kTrackMouseLocationOptionDontConsumeMouseUp, 50 / 1000.0, outPt, outModifiers, outResult); int type = 0, button = 0; switch ((int) outResult [0]) { + case OS.kMouseTrackingTimedOut: { + runAsyncMessages (); + break; + } case OS.kMouseTrackingMouseDown: { type = SWT.MouseDown; int newState = OS.GetCurrentEventButtonState (); @@ -2929,14 +2933,14 @@ boolean runGrabs () { break; } case OS.kMouseTrackingMouseKeyModifiersChanged: break; - case OS.kMouseTrackingUserCancelled: break; - case OS.kMouseTrackingTimedOut: break; + case OS.kMouseTrackingUserCancelled: break; case OS.kMouseTrackingMouseMoved: { type = SWT.MouseMove; break; } } - runEnterExit (); + boolean events = type != 0; + events |= runEnterExit (); if (type != 0) { OS.GetControlBounds (handle, rect); int x = outPt.h - rect.left; @@ -2950,6 +2954,7 @@ boolean runGrabs () { } } } + if (events) runDeferredEvents (); } } finally { grabbing = false; |