Bug 215870 - Display#post not working correct on OS-X when shell disposed
Summary: Display#post not working correct on OS-X when shell disposed
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 215872
  Show dependency tree
 
Reported: 2008-01-18 17:22 EST by Thomas Schindl CLA
Modified: 2012-06-22 12:38 EDT (History)
3 users (show)

See Also:


Attachments
Test snippet (1.90 KB, text/plain)
2008-01-18 17:22 EST, Thomas Schindl CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schindl CLA 2008-01-18 17:22:31 EST
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.
Comment 1 Steve Northover CLA 2008-03-05 21:48:27 EST
FH, please investigate.
Comment 2 Felipe Heidrich CLA 2008-03-11 17:18:55 EDT
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);

Comment 3 Thomas Schindl CLA 2008-03-11 18:42:44 EDT
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).
Comment 4 Thomas Schindl CLA 2008-03-11 18:51:19 EDT
Would notifyListener be cleaner solution, if it would work on OS-X (See http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg37864.html)
Comment 5 Silenio Quarti CLA 2012-06-22 12:38:12 EDT
Closing report, platform is discontinued.

Works on cocoa.