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

[runtime] Improve --wails-draggable by starting a drag immediately but only for the first click in a series #2302

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

stffabi
Copy link
Collaborator

@stffabi stffabi commented Jan 15, 2023

This removes the sometime lagging experience when starting to drag on Windows. But it's still possible to use double-click events for adding e.g. a WindowToggleMaximise.

Tested on:

  • Windows
  • macOS
  • Linux

@stffabi stffabi changed the title [runtime] Improve dragging by starting a drag immediately but only for the first click in a series [runtime] Improve --wails-draggable by starting a drag immediately but only for the first click in a series Jan 15, 2023
@stffabi stffabi marked this pull request as ready for review January 15, 2023 20:04
@stffabi
Copy link
Collaborator Author

stffabi commented Jan 16, 2023

This doesn't work well on Linux, double click events really often get swallowed. So the previous solution did work far better on Linux. I'll update the PR to use the old solution conditionally depending on the platform.

@stffabi stffabi marked this pull request as draft January 16, 2023 08:08
@stffabi stffabi marked this pull request as ready for review January 16, 2023 08:44
@stffabi
Copy link
Collaborator Author

stffabi commented Jan 16, 2023

Updated version pushed which defers the drag to mousemove for Linux.

…ut only for the first click in a series

This removes the sometime lagging experience when
starting to drag on Windows. But it's still possible to use
double-click events for adding e.g. a WindowToggleMaximise.
@stffabi stffabi enabled auto-merge (squash) January 16, 2023 09:54
Copy link
Member

@leaanthony leaanthony left a comment

Choose a reason for hiding this comment

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

Awesome! Absolute beast mode!
This will get easier when we split the JS to the different platforms.

@stffabi stffabi merged commit 0a98efe into wailsapp:master Jan 16, 2023
@stffabi stffabi deleted the feature/improve-dragging branch January 16, 2023 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants