Skip to content

GLFW transparent window background touch/click pass through - #8092

Merged
danoli3 merged 8 commits into
openframeworks:masterfrom
danoli3:glfw-transparent
Oct 30, 2024
Merged

GLFW transparent window background touch/click pass through#8092
danoli3 merged 8 commits into
openframeworks:masterfrom
danoli3:glfw-transparent

Conversation

@danoli3

@danoli3 danoli3 commented Aug 23, 2024

Copy link
Copy Markdown
Member

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

danoli3 commented Aug 23, 2024

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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?

@danoli3 danoli3 left a comment

Copy link
Copy Markdown
Member Author

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

danoli3 commented Aug 27, 2024

Copy link
Copy Markdown
Member Author
  • ofSetWindowMousePassthrough()
  • settings.mousePassThrough =

@danoli3 danoli3 added this to the 0.13.0 milestone Aug 27, 2024

@danoli3 danoli3 left a comment

Copy link
Copy Markdown
Member Author

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!

@danoli3

danoli3 commented Oct 30, 2024

Copy link
Copy Markdown
Member Author

Okay rechecked this bad boi going to merge

@danoli3
danoli3 merged commit 2b7745d into openframeworks:master Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants