File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,10 @@ pub struct NativeOptions {
270
270
/// You should avoid having a [`egui::CentralPanel`], or make sure its frame is also transparent.
271
271
pub transparent : bool ,
272
272
273
+ /// On desktop: mouse clicks pass through the window, used for non-interactable overlays
274
+ /// Generally you would use this in conjunction with always_on_top
275
+ pub mouse_passthrough : bool ,
276
+
273
277
/// Turn on vertical syncing, limiting the FPS to the display refresh rate.
274
278
///
275
279
/// The default is `true`.
@@ -389,6 +393,7 @@ impl Default for NativeOptions {
389
393
max_window_size : None ,
390
394
resizable : true ,
391
395
transparent : false ,
396
+ mouse_passthrough : false ,
392
397
vsync : true ,
393
398
multisampling : 0 ,
394
399
depth_buffer : 0 ,
Original file line number Diff line number Diff line change @@ -383,6 +383,9 @@ mod glow_integration {
383
383
integration. egui_ctx . set_visuals ( theme. egui_visuals ( ) ) ;
384
384
385
385
gl_window. window ( ) . set_ime_allowed ( true ) ;
386
+ if self . native_options . mouse_passthrough {
387
+ gl_window. window ( ) . set_cursor_hittest ( false ) . unwrap ( ) ;
388
+ }
386
389
387
390
{
388
391
let event_loop_proxy = self . repaint_proxy . clone ( ) ;
You can’t perform that action at this time.
0 commit comments