Some runs, mouse button callback only fires for double clicks

  1. I have a very simple app that uses glfw and nanovg. On my Macbook, on about 40% of launches, the mouse button callback only fires upon a double click. Single clicks don’t register. The other 60% launches it works fine. The problem never happens on my iMac Pro. Is this a known issue that has been fixed?

  2. I tried building master on the command line, but received an error running cmake because it expected a 10.13 SDK and I have 10.14, so I fixed that, and now make fails here:

Scanning dependencies of target glfw
[ 1%] Building C object src/CMakeFiles/glfw.dir/context.c.o
In file included from …/dev-ext/glfw/src/context.c:28:
In file included from …/dev-ext/glfw/src/internal.h:183:
In file included from…/dev-ext/glfw/src/cocoa_platform.h:30:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:34:10: fatal error: ‘CarbonSound/CarbonSound.h’ file not found
#include <CarbonSound/CarbonSound.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Perhaps I am doing something wrong to build it. The docs just say: “You should now have all required dependencies and the project files or makefiles necessary to compile GLFW. Go ahead and compile the actual GLFW library with these files, as you would with any other project.”

I don’t find any xcodeproj file after running cmake.

  1. I’ve not heard of this. I would check to see if you have a mouse problem first, and also try the events.c test from GLFW to check if that app receives the callback correctly.
  2. I’ve heard people can compile with SDK 10.14. The error mesage is that an internal OSX header cannot find another OSX header due to search path issues. It’s possible that the project files you’ve built don’t have the paths set correctly. Perhaps take a look at the CMAKE_OSX_SYSROOT documentation or the answers to this stackoverflow question.

I seem to have solved my building problem by deleting, re-cloning and re-cmaking glfw.

I discovered one other thing about the double clicking problem:
It only happens when I run my program from Xcode.