Skip to content
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

GLFW transparent window background touch/click pass through #8092

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

danoli3
Copy link
Member

@danoli3 danoli3 commented Aug 23, 2024

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 danoli3 added the glfw label Aug 23, 2024
@danoli3
Copy link
Member Author

danoli3 commented Aug 23, 2024

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 danoli3 requested a review from ofTheo August 23, 2024 07:58
@artificiel
Copy link
Contributor

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?

Copy link
Member Author

@danoli3 danoli3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with better variables / function names

@danoli3
Copy link
Member Author

danoli3 commented Aug 27, 2024

  • ofSetWindowMousePassthrough()
  • settings.mousePassThrough =

@danoli3 danoli3 added this to the 0.13.0 milestone Aug 27, 2024
Copy link
Member Author

@danoli3 danoli3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome this is looking ready, now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants