diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java index 2de29b8730..451abe9f7d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java @@ -4164,13 +4164,36 @@ void sendEvent (EventTable table, Event event) { try { sendEventCount++; if (!filterEvent (event)) { - if (table != null) table.sendEvent (event); + if (table != null) { + sendPreEvent(event); + try { + table.sendEvent (event); + } finally { + sendPostEvent(event); + } + } } } finally { sendEventCount--; } } +void sendPreEvent(Event event) { + if (event == null || (event.type != SWT.PreEvent && event.type != SWT.PostEvent)) { + if (this.eventTable != null && this.eventTable.hooks(SWT.PreEvent)) { + sendEvent(SWT.PreEvent, null); + } + } +} + +void sendPostEvent(Event event) { + if (event == null || (event.type != SWT.PreEvent && event.type != SWT.PostEvent)) { + if (this.eventTable != null && this.eventTable.hooks(SWT.PostEvent)) { + sendEvent(SWT.PostEvent, null); + } + } +} + static NSString getApplicationName() { NSString name = null; int pid = OS.getpid (); |