Community
Participate
Working Groups
Created attachment 87310 [details] Test snippet Disposing the shell and posting an event afterwards doesn't make the event receive on the other still open shell.
FH, please investigate.
Mac and Windows are a bit different here. In Mac it seens that the shell still has a mouse grab even after it is disposed. Not only the synthetic mouse events are lost but the real mouse up too. The only code that worked for me was to post a mouse down and a mouse up in a timerExec after the shell is disposed. Note: Display#post is intent for testing, we should not be using it to implement some behaviour in your app. You could achieve the same result with: Point pt = display.map(s, t, event1.x, event1.y); s.dispose(); TableItem item = t.getItem(pt); t.setSelection(item);
I agree that this is not an ideal solution but your code is not the same as passing the event because it doesn't provide multi-selection support (CTRL,SHIFT) which was the orignating problem if you take a loo at bug 195137. The solution I'm using now was suggested in this newsgroup thread (http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg37885.html) (if you read the whole thread you'll see the other problems faced on OS-X).
Would notifyListener be cleaner solution, if it would work on OS-X (See http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg37864.html)
Closing report, platform is discontinued. Works on cocoa.