Skip to content

Commit

Permalink
In custom_titlebar example handle touchstart event to drag titlebar (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
PerBothner authored Aug 22, 2021
1 parent f9d7049 commit 80b0919
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/custom_titlebar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ fn main() -> wry::Result<()> {
: window.rpc.notify('drag_window');
}
})
document.addEventListener('touchstart', (e) => {
if (e.target.classList.contains('drag-region')) {
window.rpc.notify('drag_window');
}
})
const style = document.createElement('style');
style.textContent = `
Expand Down

0 comments on commit 80b0919

Please sign in to comment.