Bug 560294

Summary: [win32] Menu is still visible after dispose
Product: [Eclipse Project] Platform Reporter: Rolf Theunissen <rolf.theunissen>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.14   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
Example to reproduce none

Description Rolf Theunissen CLA 2020-02-18 15:02:06 EST
Created attachment 281856 [details]
Example to reproduce

When a submenu is disposed, it remains visible after it is disposed. That is, if the menu item is selected again, the menu is shown. It is expected that the menu is gone after dispose.

In the attached example, click 'Dispose SubMenu' and reopen the menu. Disposing the containing MenuItem does remove the menu.

Calling 'if (cascade != null) cascade.setMenu (null, false);' in Menu#releaseParent() (as GTK does) removes the menu. Though a similar call exists in Menu#destroyWidget(). Apparently this does not do the job correctly.