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

ebiten: add an API to allow cursor to pass through window #2511

Closed
5 of 10 tasks
miniscruff opened this issue Dec 29, 2022 · 3 comments
Closed
5 of 10 tasks

ebiten: add an API to allow cursor to pass through window #2511

miniscruff opened this issue Dec 29, 2022 · 3 comments

Comments

@miniscruff
Copy link
Contributor

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • Xbox
  • Web Browsers

What feature would you like to be added?

An option to allow cursor clicks to pass through the game window and not take focus. My idea was another cursor mode such as CursorModePassThrough as it would be exclusive of the existing modes.

This would of course only apply to desktop and probably only before Run.

Why is this needed?

Creating a transparent overlay window like: mascot or neko but where the screen is large or where clicking, dragging or keys have no effects and we want to just use the window behind it.
This would be especially required if the window was a full screen window displaying some sort of full screen effect such as the weather or whatever.

@hajimehoshi
Copy link
Owner

This will be possible in GLFW 3.4, instead of 3.3: https://www.glfw.org/docs/3.4/window_guide.html#GLFW_MOUSE_PASSTHROUGH_hint

I'll take a look more but probably we have to wait for GLFW 3.4 stable.

@hajimehoshi
Copy link
Owner

Oops, on Linux, this requires a new dependency libXext...

https://github.com/glfw/glfw/blob/3eaf1255b29fdf5c2895856c7be7d7185ef2b241/src/x11_init.c#L879-L908

hajimehoshi added a commit that referenced this issue Sep 18, 2023
hajimehoshi added a commit that referenced this issue Sep 18, 2023
hajimehoshi added a commit that referenced this issue Sep 18, 2023
@hajimehoshi hajimehoshi changed the title Option to allow cursor to pass through window ebiten: add an API to allow cursor to pass through window Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants