diff options
author | 2024-09-05 11:13:37 +0200 | |
---|---|---|
committer | 2024-09-05 11:13:37 +0200 | |
commit | 64ec099a9b4490a424d35a4be37c564177e71edf (patch) | |
tree | cd6c94ddb09fb0c768651d8bb47cfcb1f8959616 /winit | |
parent | 6009420b57933ccf799f1b7eac8debab950cdd5e (diff) | |
download | iced-64ec099a9b4490a424d35a4be37c564177e71edf.tar.gz iced-64ec099a9b4490a424d35a4be37c564177e71edf.tar.bz2 iced-64ec099a9b4490a424d35a4be37c564177e71edf.zip |
Add mouse passthrough tasks to `window` module
Co-authored-by: Jose Quesada <jquesada2016@fau.edu>
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) => { |