Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for key presses not working in viewer and other visualization GUIs on Mac OS X systems #795

Merged
merged 1 commit into from
Jul 11, 2014

Conversation

translunar
Copy link

Adds VTK_USE_COCOA advanced flag for Apple users where VTK is linked. Enabled by default.

Adds VTK_USE_COCOA advanced flag for Apple users where VTK is linked.
@translunar translunar changed the title Fixes #794. Fix for key presses not working in viewer and other visualization GUIs on Mac OS X systems Jul 9, 2014
@taketwo
Copy link
Member

taketwo commented Jul 10, 2014

Is it possible to use VTK without Cocoa?

@translunar
Copy link
Author

@taketwo Good question.

http://www.vtk.org/Wiki/Cocoa_VTK: "On OS X, there are two windowing APIs: Carbon and Cocoa. Older versions of VTK defaulted to Carbon, but newer versions default to Cocoa. Carbon support is deprecated by both Apple and VTK, and should not be used for new development."

Here's a post from the VTK ML about changing the default: http://www.vtk.org/pipermail/vtk-developers/2007-October/004794.html

I suppose it's possible that people might want to use Carbon instead if they were on earlier versions of Mac OS X. However, both Homebrew recipes use Cocoa and don't provide an option. I'm not a Macports user, so I can't verify it, but I doubt they're supporting Carbon anymore either. And in the course of installing VTK, I didn't find a single person who was able to install it manually on a Mac (everyone used brew or ports).

The more practical problem is that I have no way of testing Carbon support, since my Macbook Air is 64-bit.

Now, I will say that it's possible to use VTK and PCL without this flag. But without this flag, the event handler won't be able to catch any events. Another issue is that the window won't show up in the launcher (which is a substantial UI problem).

This patch doesn't prevent people from using the current, broken way of doing things. They'd just have to change an option with ccmake. It does, however, ensure that on the vast majority of Mac OS X systems, the UI will work properly.

Sorry, lengthy answer, but I'm a scientist, so that's what you get from me. =)

@taketwo
Copy link
Member

taketwo commented Jul 10, 2014

Thanks for the explanation. I am not a Mac user by the way :)

I just thought that maybe we do not even have to provide this option in order not to confuse users. But from your answer I think it is okay if we keep it (anyways it's marked as "advanced").

@translunar
Copy link
Author

Okay. Anything else I need to do before this is merged?

@taketwo
Copy link
Member

taketwo commented Jul 11, 2014

I don't think so. Just wanted to give an opportunity to comment to someone who actually runs Mac.

taketwo added a commit that referenced this pull request Jul 11, 2014
Fix for key presses not working in viewer and other visualization GUIs on Mac OS X systems
@taketwo taketwo merged commit f56b9b2 into PointCloudLibrary:master Jul 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants