-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
library_glfw.js: glfwFocusWindow/glfwGetWindowAttrib(window,GLFW_FOCUSED) broken #6409
Comments
For example, in the |
Do you mean that the user must click on the window manually first? |
May be... Any plans to add more then one canvas on the page? |
There is an open PR for adding multiwindow/multicanvas support for SDL (I don't remember if in the SDL2 ports repo or in this one). I'm not familiar with glfw, but yeah, it sounds like that flag should be changed. In theory perhaps the right behavior is to say the window is focused if the tab is active, or something like that? Anyhow, PR for this would be very welcome. |
Hey guys, can anyone help here or advise a possible implementor? Cc: @satoshinm, @guillaumeblanc, @cgibson... |
In your init code before creating a window call
Of course we could also add direct support for that feature but if you just want things to work that will do it. You can also hack on
to
Maybe that should be the default? I thought about looking into making focus work but it's not an easy as it sounds. Is it that the tab is focused or is it that particular canvas? In other words you can run multiple emscripten apps on a single page, clicking on one seems like it should focus that particular app. But I can also imagine that even if that particular canvas does not have the focus some apps want the focus constantly (meaning even if the user never clicks the canvas they want the mouse position to be transmitted to the app). So, not really sure what to do there. I suppose an app that doesn't care about focus wouldn't be calling |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant. |
The only window that we can create perfectly handles all input events, but never is focused?
The text was updated successfully, but these errors were encountered: