[RealGUI] Fixes #183 : Use the qt menu instead of the native one in Mac OS #366
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following the issue #183 , this is a proposed solution since the issue is starting to date and is still present on OS X. Don't hesitate to refuse it if you prefer to go with another solution. At least now this fix will be publicly seen by people who wish to get a fast fix for the bug.
This is a small change that forces the GUI to use the Qt menu instead of the native one for Mac OS X. This feature is available for other operating system by disabling a new cmake option named "SOFAGUI_ENABLE_NATIVE_MENU" (the name matches the other gui related cmake options). This cmake option is true by default on every OSes except Mac OS X (Darwin).
Since I think that many people execute runSofa directly in the build directory instead of a bundled mac application (.app), this should fix the unresponsive menu bug.
Note that the menu will be displayed directly onto the GUI instead of the native menus of OS X GUI.
Note also that I didn't test this feature on Windows since I don't own a license. It does work well on Gnome shell based linux distro last time I checked. But anyway, the feature is disabled on other OSes than OS X, so it shouldn't change anything for those who use Windows or Linux.
If some people could help me by testing this feature on Windows and some Linux desktop environments, that would be great and bullet proofing the feature for people who wish to use the Qt menus even if they are not with OS X.
This PR:
Reviewers will merge only if all these checks are true.