| Cocoa: Mouse Events on Shells with NO_FOCUS style and defined Region [message #661134] |
Wed, 23 March 2011 06:26 |
Eclipse User |
|
|
|
Our application makes use of Shells as a highlighting mechanism. In order to highlight a section of the UI, we create a Shell with a background color at the bounds that we wish to highlight. The Shell has the style SWT.NO_TRIM | SWT.ON_TOP | SWT.NO_FOCUS, a background color, and a defined Region such that it forms a rectangular outline of a specific component.
On Windows, GTK, and Carbon, the Shells serve their purpose: Highlighting without "intercepting" mouse events. On Cocoa however, the Shells receive mouse events, meaning that the Shells interfere with the standard behavior of the rest of the application. Cocoa also differs from the other platforms in that Display.getCursorControl() returns the highlighting Shell, rather than the Control that is being "highlighted". Is this expected / intentional behavior for the Cocoa SWT implementation? If yes, can anyone suggest a different way to achieve this highlighting?
|
|
|
Powered by
FUDForum. Page generated in 0.03648 seconds