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

Implement window_start_drag on Windows and Linux. #100464

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Dec 16, 2024

Implements DisplayServer::window_start_drag for Windows and Linux.

Tested on Windows and X11, and Wayland.

@Riteo
Copy link
Contributor

Riteo commented Dec 17, 2024

seems like xdg_toplevel_drag_v1 protocol is not widely supported

xdg_toplevel_drag is for something else (drag 'n' dropping windows, think browser tabs).

xdg_toplevel::move is the proper option. It's an input operation, which needs the latest input serial (I should really make it a generic method).

I can whip up a quick patch tomorrow if you want

@bruvzg
Copy link
Member Author

bruvzg commented Dec 17, 2024

xdg_toplevel::move is the proper option. It's an input operation, which needs the latest input serial (I should really make it a generic method).

Thanks! This seems to be working, will update PR in a moment.

I should really make it a generic method

Used pointer_data.button_serial, since it will match other platforms (either use or simulate pointer data).

@Riteo
Copy link
Contributor

Riteo commented Dec 17, 2024

Wow that was quick! Thank you! I can confirm that this works fine on sway too :D

Copy link
Contributor

@Riteo Riteo left a comment

Choose a reason for hiding this comment

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

Approving from the Wayland side!

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Dec 17, 2024
@akien-mga akien-mga merged commit 4e46e8b into godotengine:master Dec 17, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants