[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Passing events from Widget to Widget

Display.post expects a point in the display's coordinate system, so I think you have to translate the shell's coordinates to the display's:

            Point toDisplay = s.toDisplay( event.x, event.y );
            event.x = toDisplay.x;
            event.y = toDisplay.y;
            s.close();
            display.post( event );

Hope this helps,

Matthew

Tom Schindl wrote:
Hi,

I've got the following problem. I'm opening a Shell as a ToolTip and of the user clicks the shell the Event should get passed on to the Widget below the ToolTip (See a complete description of the problem in https://bugs.eclipse.org/bugs/show_bug.cgi?id=195137).

On Win32 this works with the code attached but on OS-X it is not working! The question is now whichone behaves correct. It is also possible that I'm doing something completely stupied which has to be done differently.

Could someone from the SWT-Team have a look and tell me/us how this can be resolved?

Tom