feat: Try to support touch drag

This commit is contained in:
MystiPanda 2024-02-27 23:41:52 +08:00
parent 031c15fd7d
commit 75e5d42d8b
2 changed files with 8 additions and 1 deletions

View File

@ -141,7 +141,10 @@ pub fn create_window(app_handle: &AppHandle) {
_ => { _ => {
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
{ {
builder = builder.inner_size(800.0, 636.0).center(); builder = builder
.additional_browser_args("--enable-features=msWebView2EnableDraggableRegions")
.inner_size(800.0, 636.0)
.center();
} }
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]

View File

@ -56,3 +56,7 @@ body {
-moz-user-select: none; -moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
} }
[data-windrag] {
app-region: drag;
}