missing new hint "GLFW_MOUSE_PASSTHROUGH" in current version
See original GitHub issueHello, thank you for creating this awesome library.
it was added/released in glfw hours before the last release of pyGLFW!
I tried glfw.window_hint(0x0002000D, glfw.TRUE)
instead of glfw.window_hint(glfw.MOUSE_PASSTHROUGH, glfw.TRUE)
but found out the compiled library needs updating.
Traceback (most recent call last):
File "./test-clickthrough.py", line 37, in <module>
glfw.window_hint(0x0002000D, 1)
File "glfw/__init__.py", line 1138, in window_hint
_glfw.glfwWindowHint(hint, value)
File "glfw/__init__.py", line 628, in errcheck
_reraise(exc[1], exc[2])
File "glfw/__init__.py", line 52, in _reraise
raise exception.with_traceback(traceback)
File "glfw/__init__.py", line 607, in callback_wrapper
return func(*args, **kwargs)
File "glfw/__init__.py", line 820, in _handle_glfw_errors
raise GLFWError(message)
glfw.GLFWError: (65539) b'Invalid window hint 0x0002000D'
can you please release an update?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
GLFW Mouse Passthrough Broken in Docking Branch #4635
If you set up a GLFW window and enable the mouse passthrough hint, the actual mouse passthrough does not happen and instead mouse...
Read more >Release notes - GLFW
GLFW now provides the GLFW_MOUSE_PASSTHROUGH window hint for making a window transparent to mouse input, lettings events pass to whatever window ...
Read more >window.dox - Google Git
such a window, request the current video mode. @code. const GLFWvidmode* mode = glfwGetVideoMode(monitor);. glfwWindowHint(GLFW_RED_BITS, mode->redBits);.
Read more >GLFW (LWJGL 3.3.2-snapshot)
Returns the compile-time generated version string of the GLFW library binary. static GLFWVidMode. glfwGetVideoMode(long monitor). Returns the current video mode ...
Read more >mouse passthrough in a transparent window in glfw? - Reddit
Looks like there's a window hint for it https://www.glfw.org/docs/3.4/window_guide.html#GLFW_MOUSE_PASSTHROUGH_hint.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I know this issue is closed and the flag won’t be added until the 3.4 release, but it’s a good solution for me at the moment and so I hacked together a solution. I wanted to write it up for anyone else who comes across this issue and would like to set the 3.4 dll up, but (like me) finds cmake an absolute nightmare.
Anyway, enough about my problems. Here’s how you (the search engine engine user who came across this ticket) can (hopefully) use the 3.4 glfw dll.
Get 3.4
glfw3.dll
https://github.com/aSemy/glfw/releasesI forked glfw/glfw and set up a build job to do this, based off the
.appveyor.yml
in glfw/glfw. If you want to fork glfw/glfw yourself, and copy the.github/workflows/cmakesimple.yml
I made - go ahead.Windows: You might need to right click on the downloaded archive and uncheck the security warning? I used 7zip to extract it.
I found the pyGLFW folder
virtualenvs\asdja-py3.9\Lib\site-packages\glfw
and replaced the existing glfw3.dl with the downloaded one.I found the ‘id code’ for the
GLFW_MOUSE_PASSTHROUGH
by searching in the glfw/glfw project (it’s in fileinclude/GLFW/glfw3.h
) - it turns out it’s0x0002000D
I edited 2 pyGLFW files, in it’s module folder.
__init__.py
> insert this valueGLFW.py
> Between 'FOCUS_ON_SHOW ’ (line 530) andRED_BITS
(line 531) I added…I added a print statement after the import to check it was working.
output:
(3, 4, 0)
Ta da!
Click here to have a look at an Example
And check out the docs - they say that this new flag is “only supported for undecorated windows” https://www.glfw.org/docs/3.4/group__window.html#ga88981797d29800808ec242274ab5c03a
I’ve just released version 2.4.0, along with a helper package glfw_preview.
With this new version, if you:
pip install glfw[preview]
, orpip install glfw_preview
after upgrading glfw, orPYGLFW_PREVIEW
to a non-empty valuethe
glfw
package will include wrappers for unreleased functions and macros. There will still be a delay between them being introduced to the GLFW master and them being wrapped, as there’s still manual work involved with that, but I’ve setup a CI script that should inform me of any unwrapped macros or functions every saturday morning, so the delay shouldn’t be that long.Please try it and let me know if there are any issues with the preview mechanism or with the newly-wrapped functions and macros.