Skip to content

glfwSetWindowFocusCallback does not seem to work #26230

@relaxbox

Description

@relaxbox

Calling glfwSetWindowFocusCallback succeeds but the callback does not seem to be actually called on focus change. Getting the window focus via glfwGetWindowAttrib doesn't work either (it always returns true).

I know my version is out of date but even in the master branch it looks like GLFW_FOCUSED and window.windowFocusFunc are never referenced. The onBlur event handler in libglfw.js also doesn't do anything to propagate this event.

Is there a reason this isn't implemented? It seems that everything is in place -- I can give it a go if I'm not talking crazy here.

Version of emscripten/emsdk:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.59 (0e4c5994eb5b8defd38367a416d0703fd506ad81)
clang version 19.0.0git (https:/github.com/llvm/llvm-project df762a1643bb5b0b3c907611d118c82d4b68a39d)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /emsdk/upstream/bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions