Adds drag region support for touch screens (#3178)

https://github.com/tauri-apps/tauri/issues/4746#issuecomment-2007114269

Signed-off-by: maksimetny <46288028+maksimetny@users.noreply.github.com>
This commit is contained in:
maksimetny 2025-04-19 22:18:37 +03:00 committed by GitHub
parent 6cdc07406d
commit f695fe0ee7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -473,7 +473,7 @@ function handleAuxClick(e) {
<RunningAppBar /> <RunningAppBar />
</Suspense> </Suspense>
</div> </div>
<section v-if="!nativeDecorations" class="window-controls"> <section v-if="!nativeDecorations" class="window-controls" data-tauri-drag-region-exclude>
<Button class="titlebar-button" icon-only @click="() => getCurrentWindow().minimize()"> <Button class="titlebar-button" icon-only @click="() => getCurrentWindow().minimize()">
<MinimizeIcon /> <MinimizeIcon />
</Button> </Button>
@ -704,6 +704,14 @@ function handleAuxClick(e) {
grid-area: status; grid-area: status;
} }
[data-tauri-drag-region] {
-webkit-app-region: drag;
}
[data-tauri-drag-region-exclude] {
-webkit-app-region: no-drag;
}
.app-contents { .app-contents {
position: absolute; position: absolute;
z-index: 1; z-index: 1;