openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.98k stars 2.55k forks source link

GLFW transparent window background touch/click pass through #8092

Closed danoli3 closed 3 weeks ago

danoli3 commented 3 months ago

As mentioned on the forums here: https://forum.openframeworks.cc/t/transparent-window-app-with-mouse-click-pass-through/43816

GLFW Window clear transparency - mouse passThrough

Changes additional bools for GLFW settings.

Thanks to @artificiel for documenting floating / passThrough info

usage would be something like in main.cpp:

ofGLFWWindowSettings settings;
settings.transparent = true;
settings.mousePassThrough = true;
settings.floating = true;
settings.decorated = false;

Example:

transparentWindow
danoli3 commented 3 months ago

I made an example as this requires a bit of main.cpp setup and understanding of the limitations and powers of this GLFW passThrough.

artificiel commented 3 months ago

I wonder if .transparentInput is the correct base name for the click through feature? adopting GLFW naming would make things more auto-documented, so .mousePassthrough to shadow GLFW_MOUSE_PASSTHROUGH?

likewise, ofSetWindowMousePassthrough(bool) instead of ofSetWindowTransparencyInput(bool)?

unless "transparent input" is a term commonly used?

danoli3 commented 2 months ago
danoli3 commented 3 weeks ago

Okay rechecked this bad boi going to merge