| Summary: | [Gtk] Replace deprecated gtk_menu_popup | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Leo Ufimtsev <lufimtse> | ||||
| Component: | SWT | Assignee: | Ian Pun <ipun> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Leo Ufimtsev <lufimtse> | ||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | akurtako, arunkumar.thondapu, ericwill, gautier.desaintmartinlacaze, ipun, lufimtse, peter | ||||
| Version: | 4.6 | ||||||
| Target Milestone: | 4.8 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| See Also: |
https://git.eclipse.org/r/98030 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=7714fdbf1ce0110744da9c164486c12254d5bd6f |
||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 496923, 516841 | ||||||
| Attachments: |
|
||||||
|
Description
Leo Ufimtsev
gtk_menu_popup has been deprecated officially now (since version 3.22). We should fix this in 4.8. I'll take a look at this, looks like popup is being called outside of a trigger event, which is required by the new methods. New Gerrit change created: https://git.eclipse.org/r/98030 Current implementation of how gtk_menu_popup is done is that everything is hooked to a event stack inside Display. However, the new implementation of using gtk_menu_popup_at_pointer() requires it to be done within a gtkEvent. This is difficult to do as many applications use setVisible() on the Menu widget, which is gtkEvent independent. We would need to figure out a situation on how to support setVisible() to somehow generate a gtkEvent in which we can attach our gtk_menu_popup_at_pointer() function from. Created attachment 268963 [details]
Modified snippet for testing of asynchronous calls to Menu
attached snippet was used to test if the patch will work with asynchronous calls to menu @Ian, btw, if time permits, could you also investigate deprecated gtk_im_multicontext_append_menuitems()? Gerrit change https://git.eclipse.org/r/98030 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=7714fdbf1ce0110744da9c164486c12254d5bd6f Thank you for patch. |