Community
Participate
Working Groups
Created attachment 175787 [details] SnippetMouseMove.java I20100802-1800 Cocoa, was OK in 3.6 Mouse move events are broken in SWT.TOOL shells. I don't get any events, but the widgets below the shell get the events. This can be seen in the attached snippet when you click the button and then move the mouse in the second shell to where it overlaps the StyledText and the Sash. MouseDown works fine, and as soon as the mouse is down, I also get move events.
To send a mouse moved event we call findControl to see which window/control was hit. So, we scan the list of windows using orderedWindows to return the list of all windows in front to back order. The problem is that SWT.TOOL windows are created as NSPanels, so we can get the utility window titlebar, but NSPanels _are not included_ in the windows returned by orderedWindows! Arrrggh! So, the SWT.TOOL window will never get a mouse moved event. Fortunately, I think I can rewrite findControl to not use orderedWindows.
What caused the regression compared to 3.6?
SWT.TOOL windows now are implemented via NSPanel (bug 218929), since that's the only way you can set the NSUtilityWindowMask to get the thinner title bar. That was a small change, but it turned out to have a lot of subtle consequences. They also hide on deactivate, which ends up hiding the parent window in SWT.
Created attachment 175812 [details] Fix Use the full window list when looking for the window under the mouse.
Fixed > 20100803.
(In reply to comment #1) Thanks Scott for the detailed explanation. Can you make sure this gets released for M1? Thanks!