openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

GLFW transparent window background touch/click pass through

Open danoli3 opened this issue 1 year ago • 3 comments

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

  • GLFW 3.4 + supports click pass through with these commands

Changes additional bools for GLFW settings.

  • bool mousePassThrough; // input pass through for transparency window
  • bool floating; // type of window

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 avatar Aug 23 '24 03:08 danoli3

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

danoli3 avatar Aug 23 '24 07:08 danoli3

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?

artificiel avatar Aug 23 '24 22:08 artificiel

  • ofSetWindowMousePassthrough()
  • settings.mousePassThrough =

danoli3 avatar Aug 27 '24 14:08 danoli3

Okay rechecked this bad boi going to merge

danoli3 avatar Oct 30 '24 05:10 danoli3