1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Apply 'with_active' option to winit (#2813)

* feat: apply 'with_active' option to winit

* fix: remove platform specification

- winit accept this option for all platforms

* build fix

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
Dixeran
2023-04-18 22:13:25 +08:00
committed by GitHub
parent af4d737c92
commit 8a2cfbd131
2 changed files with 8 additions and 0 deletions

View File

@@ -284,6 +284,9 @@ pub struct NativeOptions {
/// Generally you would use this in conjunction with always_on_top
pub mouse_passthrough: bool,
/// Whether grant focus when window initially opened. True by default.
pub active: bool,
/// Turn on vertical syncing, limiting the FPS to the display refresh rate.
///
/// The default is `true`.
@@ -421,6 +424,9 @@ impl Default for NativeOptions {
resizable: true,
transparent: false,
mouse_passthrough: false,
active: true,
vsync: true,
multisampling: 0,
depth_buffer: 0,