Skip to content

Menu for org.eclipse.swt.custom.CTabFolder opens on MouseDown instead of MouseUp, causing MenuDetectListener not to fire #350

@zev333

Description

@zev333

We use a MenuDetectListener to determine which tab the context menu was opened on, so we can perform actions on the correct CTabItem.

Currently, the menu for org.eclipse.swt.custom.CTabFolder opens on MouseDown, while the MenuDetectListener is triggered on MouseUp. This means that to trigger the listener you need to left-click, move the mouse outside of the menu area, and only then release the mouse button. As a result, the MenuDetectListener is either never triggered or is triggered after menuAboutToShow.

On standard widgets such as Label, both menuAboutToShow and MenuDetectListener are fired on mouse up and in the correct order — this behavior was fixed by:
#346

I’ve attached a snippet example linked with 4.5.0-SNAPSHOT. It can be started by running mvn jetty:run, and the test is available under /menu.

eclipe-menu-snippet.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions