Skip to content

Commit

Permalink
fix: Add missing allowlist config for cursor apis, closes #5207 (#5211)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars committed Sep 16, 2022
1 parent 2954f6d commit c764408
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/cursor-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri-utils": patch
---

Add missing allowlist config for `set_cursor_grab`, `set_cursor_visible`, `set_cursor_icon` and `set_cursor_position` APIs.
16 changes: 16 additions & 0 deletions core/tauri-utils/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,18 @@ pub struct WindowAllowlistConfig {
/// Allows setting the skip_taskbar flag of the window.
#[serde(default, alias = "set-skip-taskbar")]
pub set_skip_taskbar: bool,
/// Allows grabbing the cursor.
#[serde(default, alias = "set-cursor-grab")]
pub set_cursor_grab: bool,
/// Allows setting the cursor visibility.
#[serde(default, alias = "set-cursor-visible")]
pub set_cursor_visible: bool,
/// Allows changing the cursor icon.
#[serde(default, alias = "set-cursor-icon")]
pub set_cursor_icon: bool,
/// Allows setting the cursor position.
#[serde(default, alias = "set-cursor-position")]
pub set_cursor_position: bool,
/// Allows start dragging on the window.
#[serde(default, alias = "start-dragging")]
pub start_dragging: bool,
Expand Down Expand Up @@ -1356,6 +1368,10 @@ impl Allowlist for WindowAllowlistConfig {
set_focus: true,
set_icon: true,
set_skip_taskbar: true,
set_cursor_grab: true,
set_cursor_visible: true,
set_cursor_icon: true,
set_cursor_position: true,
start_dragging: true,
print: true,
};
Expand Down
32 changes: 32 additions & 0 deletions tooling/cli/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
"print": false,
"requestUserAttention": false,
"setAlwaysOnTop": false,
"setCursorGrab": false,
"setCursorIcon": false,
"setCursorPosition": false,
"setCursorVisible": false,
"setDecorations": false,
"setFocus": false,
"setFullscreen": false,
Expand Down Expand Up @@ -362,6 +366,10 @@
"print": false,
"requestUserAttention": false,
"setAlwaysOnTop": false,
"setCursorGrab": false,
"setCursorIcon": false,
"setCursorPosition": false,
"setCursorVisible": false,
"setDecorations": false,
"setFocus": false,
"setFullscreen": false,
Expand Down Expand Up @@ -1528,6 +1536,10 @@
"print": false,
"requestUserAttention": false,
"setAlwaysOnTop": false,
"setCursorGrab": false,
"setCursorIcon": false,
"setCursorPosition": false,
"setCursorVisible": false,
"setDecorations": false,
"setFocus": false,
"setFullscreen": false,
Expand Down Expand Up @@ -1900,6 +1912,26 @@
"default": false,
"type": "boolean"
},
"setCursorGrab": {
"description": "Allows grabbing the cursor.",
"default": false,
"type": "boolean"
},
"setCursorVisible": {
"description": "Allows setting the cursor visibility.",
"default": false,
"type": "boolean"
},
"setCursorIcon": {
"description": "Allows changing the cursor icon.",
"default": false,
"type": "boolean"
},
"setCursorPosition": {
"description": "Allows setting the cursor position.",
"default": false,
"type": "boolean"
},
"startDragging": {
"description": "Allows start dragging on the window.",
"default": false,
Expand Down

0 comments on commit c764408

Please sign in to comment.