This is a patch for the following bug (on Mac OSX):
1) Modify a buffer
2) Close the window and elect to discard without saving, application goes into background mode
3) Click the jEdit icon in the dock
Expected: A new view is opened.
Actual: Nothing.
A comment on why this patch fixes the problem: When you hit the "Discard Selected" button, the View is disposed of, but a windowActivated message also gets sent because the dialog is closed, exposing the View. In windowActivated, the (now closed and disposed) View is activated, and then when you attempt to reopen the application, the MacOSX plugin think that there is still an active view, so it just attempts to bring it to the front (even though the window has been disposed) rather than opening a new one, as should happen.
This patch just ignores that extra windowActivated message that occurs after the window is already closed (the fact that it receives one is probably a JVM bug).
Hi, I see the bug but the patch do not fix it, did I miss something ?
It works OK for me with latest trunk.
Closed - works for me already too.