Bug 559044 - Wrong armListener is called for menuItem when its menu is attached to multiple MenuItems
Summary: Wrong armListener is called for menuItem when its menu is attached to multipl...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.15   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-10 13:05 EST by Dieter Mai CLA
Modified: 2021-03-24 16:47 EDT (History)
1 user (show)

See Also:


Attachments
Example Snippet (1.79 KB, application/octet-stream)
2020-01-10 13:05 EST, Dieter Mai CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter Mai CLA 2020-01-10 13:05:02 EST
Created attachment 281448 [details]
Example Snippet

This issue happens on Windows 10 but not on Linux (Ubuntu 18). did not test other OS.
Teste with SWT 12, 14 and 15. All of which had this issue.

How to reproduce
1. Create a Menu with MenuItems A, B and C of the style CASCADE.
2. Create a Menu with with at least one MenuItem.
3. Set the Menu from step 2 as Menu for MenuItem A, B and C.
4. Create an ArmListener for each MenuItem A, B and C.

On Linux: The ArmListener assigned to a MenuItem is called when this MenuItem is armed
On Windows: The ArmListener that was assigned to MenuItem C is called for every MenuItem

Example Code Snippet: see attachment
Comment 1 Dieter Mai CLA 2021-03-24 16:47:05 EDT
Retested with SWT 4.19. The issue still occurs.