FlorianRhiem / pyGLFW

Python bindings for GLFW
MIT License
232 stars 36 forks source link

glfw.init() always pop up new window and make it active #32

Closed deepaksharma36 closed 5 years ago

deepaksharma36 commented 5 years ago

Is there any way to set glfw in way that glfw.init() pop up the new window in the background and does not make it the active window.

FlorianRhiem commented 5 years ago

You can control some window behavior using the glfw window creation hints.

You can use glfw.window_hint(glfw.FOCUSED, False) before creating a window to make sure it will not take the input focus from the current window. On macOS, this opens the window behind the current window, but in front of some other background windows.

If that isn't enough, you could iconify the window right away using AUTO_ICONIFY.

FlorianRhiem commented 5 years ago

Did this solve your issue?

deepaksharma36 commented 5 years ago

Yes! Thanks for the suggestion.