Skip to content

Add pointer warping on wayland#112287

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
Kiisu-Master:wl_pointer_warp
Feb 16, 2026
Merged

Add pointer warping on wayland#112287
Repiteo merged 1 commit into
godotengine:masterfrom
Kiisu-Master:wl_pointer_warp

Conversation

@Kiisu-Master

@Kiisu-Master Kiisu-Master commented Nov 1, 2025

Copy link
Copy Markdown
Contributor

fixes #64296
Uses the new pointer warping protocol.

@Kiisu-Master

Copy link
Copy Markdown
Contributor Author

It seems the commit hash in thirdparty/README.md for wayland-protocols didn't get updated here ae74c0c

I just copied the pointer warp xml file from the main branch, should i include the one from 1.45 if its different?

Comment thread platform/linuxbsd/wayland/wayland_thread.cpp
Comment thread platform/linuxbsd/wayland/display_server_wayland.cpp Outdated
@deralmas

deralmas commented Nov 2, 2025

Copy link
Copy Markdown
Member

I just copied the pointer warp xml file from the main branch, should i include the one from 1.45 if its different?

Yea, as wayland-protocols is at that version. If the protocol is not available there feel free to make a PR updating it.

Copied this code from pointer_set_hint, should there be a function to remove the duplicate scaling code?

Nah, it's done in only two places now and it's something that we should generally not do, as pointed out by the big comment.

What about the comment?

Not sure tbh. I'll be fair, in these cases I just keep them there, duplicated. You never know if the other half will be there by the time you'll need to read that comment again :P

@Kiisu-Master Kiisu-Master force-pushed the wl_pointer_warp branch 2 times, most recently from e95791a to 1d153b6 Compare November 3, 2025 20:27
@Kiisu-Master Kiisu-Master marked this pull request as ready for review November 3, 2025 20:42
@Kiisu-Master Kiisu-Master requested review from a team as code owners November 3, 2025 20:42
Comment thread platform/linuxbsd/wayland/wayland_thread.cpp
Comment thread platform/linuxbsd/wayland/wayland_thread.cpp Outdated
@Kiisu-Master Kiisu-Master force-pushed the wl_pointer_warp branch 2 times, most recently from 8850dc3 to 89faf8f Compare November 4, 2025 13:59
Comment thread platform/linuxbsd/wayland/wayland_thread.cpp
@Kiisu-Master

Copy link
Copy Markdown
Contributor Author

I keep forgetting to add changed files before committing

@YeldhamDev

Copy link
Copy Markdown
Member

This is not working at all on my end: Fedora Kinoite 42 / KDE Plasma 6.5.1

@Kiisu-Master

Copy link
Copy Markdown
Contributor Author

How did you test it?
For me it's working with the same plasma version... im on arch.
Just have to make sure that godot is actually using wayland.

Heres a test project i made for this:
PointerWarp.zip

@YeldhamDev YeldhamDev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, I see. I had prefer_wayland enabled and forgot that it's an editor setting. It works now.

CC @bruvzg to check the code.

@deralmas deralmas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was going to try it on my machine but it looks like sway does not implement it yet. Code looks fine except for a small nitpick.

Comment thread platform/linuxbsd/wayland/wayland_thread.cpp
@bruvzg bruvzg self-requested a review November 6, 2025 06:25
Comment thread thirdparty/README.md Outdated
Comment thread platform/linuxbsd/wayland/wayland_thread.cpp
Comment thread platform/linuxbsd/wayland/wayland_thread.cpp
Comment thread platform/linuxbsd/wayland/wayland_thread.cpp Outdated
Comment thread platform/linuxbsd/wayland/wayland_thread.cpp Outdated
@Kiisu-Master Kiisu-Master force-pushed the wl_pointer_warp branch 2 times, most recently from 7c878ca to 0d8a12c Compare November 18, 2025 23:57
@Kiisu-Master

Copy link
Copy Markdown
Contributor Author

Did I rebase at the wrong moment? Why's the windows builds failing already....

@Kiisu-Master

Copy link
Copy Markdown
Contributor Author

Seems like the nuget website is down.
It loads really slowly when i open it in my browser

@deralmas deralmas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works wonderfully on KDE Plasma 6.5.4!

Sway works identically as before (turns out it was way more broken than I tought!) so "compatibility" is preserved :)

@deralmas

Copy link
Copy Markdown
Member

(Sorry for the delay and thank you for your patience!)

@akien-mga akien-mga modified the milestones: 4.x, 4.7 Feb 15, 2026
@deralmas

deralmas commented Feb 15, 2026

Copy link
Copy Markdown
Member

Oops sorry, I forgot to push this lil' change 😅

It's trivial, just three lines for the embedder. Hope you don't mind. I didn't want to stall this PR further.

@Kiisu-Master

Copy link
Copy Markdown
Contributor Author

I assume thats to make it also work in the editors embedded game window.. I don't know how that works so thanks for doing that.

Should I rebase it again?

@deralmas

Copy link
Copy Markdown
Member

I don't know how that works so thanks for doing that.

You're welcome!

Should I rebase it again?

No need to. Usually rebasing is only necessary when conflicts arise.

@Repiteo Repiteo merged commit 2762c56 into godotengine:master Feb 16, 2026
20 checks passed
@Repiteo

Repiteo commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment