Skip to content

Conversation

@Khyati-Kapil
Copy link

feat(window-events): add drag-stopped and resize-stopped events

@Khyati-Kapil Khyati-Kapil requested a review from a team as a code owner November 19, 2025 18:28
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Nov 19, 2025
Copy link
Contributor

@Legend-Master Legend-Master left a comment

Choose a reason for hiding this comment

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

Seeing the limitation on this implementation, I think this should be done on user land or we'll need a more complete solution

})
}

window.addEventListener('tauri://resize', () => {
Copy link
Contributor

@Legend-Master Legend-Master Nov 27, 2025

Choose a reason for hiding this comment

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

This is not reliable to be honest

const cmd = e.detail === 2 ? 'internal_toggle_maximize' : 'start_dragging'
window.__TAURI_INTERNALS__.invoke('plugin:window|' + cmd)
// maximize on double-clicking it, or start dragging on single click
if (e.detail === 2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

So I believe this only works for the dragging from our custom draggable region (data-tauri-drag-region)?

Copy link
Author

@Khyati-Kapil Khyati-Kapil Nov 28, 2025

Choose a reason for hiding this comment

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

Thanks for the feedback, I will try to provide the complete solution using another approach.

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

Labels

None yet

Projects

Status: 📬Proposal

Development

Successfully merging this pull request may close these issues.

[feat] Drag-stopped and resize-stopped event are needed

2 participants