Switch GLFW windows for key presses

285 views Asked by At

I have two GLFW windows, and I would like to be able to switch between them and then move the camera around using the keyboard.

Currently:

  • I can switch between rendering in window 1 and window 2 by using glfwGetCurrentContext
  • BUT when I switch between the windows, the new window isn't the front window. As a result, none of the keypresses register until I click on the new window.

Question: How do I make the new window automatically come to the front so I don't have to manually click on the window.

1

There are 1 answers

0
Joonazan On

http://sourceforge.net/p/glfw/discussion/247562/thread/c0980c99/

Found this. So it is possible but must be done for each platform separately.