|
Link Here
|
| 367 |
*/ |
367 |
*/ |
| 368 |
if (listenToDeactivate && event.widget == getShell() |
368 |
if (listenToDeactivate && event.widget == getShell() |
| 369 |
&& getShell().getShells().length == 0) { |
369 |
&& getShell().getShells().length == 0) { |
| 370 |
close(); |
370 |
asyncClose(); |
| 371 |
} else { |
371 |
} else { |
| 372 |
/* We typically ignore deactivates to work around platform-specific |
372 |
/* We typically ignore deactivates to work around platform-specific |
| 373 |
* event ordering. Now that we've ignored whatever we were supposed to, |
373 |
* event ordering. Now that we've ignored whatever we were supposed to, |
|
Link Here
|
| 399 |
parentDeactivateListener= new Listener() { |
399 |
parentDeactivateListener= new Listener() { |
| 400 |
public void handleEvent(Event event) { |
400 |
public void handleEvent(Event event) { |
| 401 |
if (listenToParentDeactivate) { |
401 |
if (listenToParentDeactivate) { |
| 402 |
close(); |
402 |
asyncClose(); |
| 403 |
} else { |
403 |
} else { |
| 404 |
// Our first deactivate, now start listening on the Mac. |
404 |
// Our first deactivate, now start listening on the Mac. |
| 405 |
listenToParentDeactivate = listenToDeactivate; |
405 |
listenToParentDeactivate = listenToDeactivate; |
|
Link Here
|
| 416 |
}); |
416 |
}); |
| 417 |
} |
417 |
} |
| 418 |
|
418 |
|
|
|
419 |
private void asyncClose() { |
| 420 |
// workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=152010 |
| 421 |
getShell().getDisplay().asyncExec(new Runnable() { |
| 422 |
public void run() { |
| 423 |
close(); |
| 424 |
} |
| 425 |
}); |
| 426 |
} |
| 427 |
|
| 419 |
/** |
428 |
/** |
| 420 |
* The <code>PopupDialog</code> implementation of this <code>Window</code> |
429 |
* The <code>PopupDialog</code> implementation of this <code>Window</code> |
| 421 |
* method creates and lays out the top level composite for the dialog. It |
430 |
* method creates and lays out the top level composite for the dialog. It |