Skip to content

Instantly share code, notes, and snippets.

@jacres
Created August 7, 2013 14:32
Show Gist options
  • Save jacres/6174591 to your computer and use it in GitHub Desktop.
Save jacres/6174591 to your computer and use it in GitHub Desktop.
Window x11Window = glfwGetX11Window( ofAppGLFWWindow::windowP );
Window root, child;
unsigned int mask;
int rootX, rootY, childX, childY;
XQueryPointer( glXGetCurrentDisplay(), x11Window, &root, &child, &rootX, &rootY, &childX, &childY, &mask);
XWarpPointer( glXGetCurrentDisplay(), None, x11Window, 0, 0, 0, 0, m_windowWidth/2, m_windowHeight/2 );
src/testApp.cpp: In member function ‘virtual void testApp::update()’:
src/testApp.cpp:760:12: warning: unused variable ‘x11Window’ [-Wunused-variable]
Window x11Window = glfwGetX11Window( ofAppGLFWWindow::windowP );
^
src/testApp.cpp:766:44: error: ‘x11Window’ was not declared in this scope
XQueryPointer( glXGetCurrentDisplay(), x11Window, &root, &child, &rootX, &rootY, &childX, &childY, &mask);
^
^
make[1]: *** [obj/linux64/Release/src/testApp.o] Error 1
make: *** [Release] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment