Skip to content

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

Merged
stffabi merged 1 commit into
wailsapp:masterfrom
stffabi:feature/improve-dragging
Jan 16, 2023
Merged

[runtime] Improve --wails-draggable by starting a drag immediately but only for the first click in a series#2302
stffabi merged 1 commit into
wailsapp:masterfrom
stffabi:feature/improve-dragging

Conversation

@stffabi

@stffabi stffabi commented Jan 15, 2023

Copy link
Copy Markdown
Contributor

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 force-pushed the feature/improve-dragging branch from 7518ff8 to 4d9d2fd Compare January 15, 2023 19:11
@stffabi
stffabi marked this pull request as ready for review January 15, 2023 20:04
@stffabi
stffabi requested a review from leaanthony January 15, 2023 20:05
@stffabi

stffabi commented Jan 16, 2023

Copy link
Copy Markdown
Contributor Author

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 force-pushed the feature/improve-dragging branch from 4d9d2fd to 2dcc929 Compare January 16, 2023 08:43
@stffabi
stffabi marked this pull request as ready for review January 16, 2023 08:44
@stffabi

stffabi commented Jan 16, 2023

Copy link
Copy Markdown
Contributor Author

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 force-pushed the feature/improve-dragging branch from 2dcc929 to 6b5381d Compare January 16, 2023 09:54
@stffabi
stffabi enabled auto-merge (squash) January 16, 2023 09:54

@leaanthony leaanthony 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.

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