diff options
author | 2024-09-05 11:22:03 +0200 | |
---|---|---|
committer | 2024-09-05 11:22:03 +0200 | |
commit | b5cbb4a4e48f219cfaac2eb67e83f57859744b5b (patch) | |
tree | c7bc3b7d8e3b6fe1b04f5996e2f86606f7e3ade0 /winit | |
parent | d1ceada11996a0137e8fb4377f1011af3f08d24f (diff) | |
parent | 64ec099a9b4490a424d35a4be37c564177e71edf (diff) | |
download | iced-b5cbb4a4e48f219cfaac2eb67e83f57859744b5b.tar.gz iced-b5cbb4a4e48f219cfaac2eb67e83f57859744b5b.tar.bz2 iced-b5cbb4a4e48f219cfaac2eb67e83f57859744b5b.zip |
Merge pull request #2284 from jquesada2016/mouse_passthrough
Add command for setting mouse passthrough
Diffstat (limited to 'winit')
-rw-r--r-- | winit/src/program.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/winit/src/program.rs b/winit/src/program.rs index 89ec5ef9..52d8eb5f 100644 --- a/winit/src/program.rs +++ b/winit/src/program.rs @@ -1435,6 +1435,16 @@ fn run_action<P, C>( )); } } + window::Action::EnableMousePassthrough(id) => { + if let Some(window) = window_manager.get_mut(id) { + let _ = window.raw.set_cursor_hittest(false); + } + } + window::Action::DisableMousePassthrough(id) => { + if let Some(window) = window_manager.get_mut(id) { + let _ = window.raw.set_cursor_hittest(true); + } + } }, Action::System(action) => match action { system::Action::QueryInformation(_channel) => { |