mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Update to to winit 0.28 (#2654)
* Update to winit 0.28 Mac trackpads pinch gestures will now generate `egui::Event::Zoom` * Update accesskit_winit * Try to get Android CI green * Fix wayland compilation * Add comment about android-activity * Update changelogs * Fix call to register_xlib_error_hook
This commit is contained in:
@@ -10,6 +10,7 @@ NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/C
|
||||
|
||||
#### Desktop/Native:
|
||||
* `eframe::run_native` now returns a `Result` ([#2433](https://github.com/emilk/egui/pull/2433)).
|
||||
* Update to `winit` 0.28, adding support for mac trackpad zoom ([#2654](https://github.com/emilk/egui/pull/2654)).
|
||||
|
||||
#### Web:
|
||||
* Prevent ctrl-P/cmd-P from opening the print dialog ([#2598](https://github.com/emilk/egui/pull/2598)).
|
||||
|
||||
@@ -92,7 +92,7 @@ egui-winit = { version = "0.20.0", path = "../egui-winit", default-features = fa
|
||||
"links",
|
||||
] }
|
||||
raw-window-handle = { version = "0.5.0" }
|
||||
winit = "0.27.2"
|
||||
winit = "0.28"
|
||||
|
||||
# optional native:
|
||||
dark-light = { version = "1.0", optional = true }
|
||||
|
||||
@@ -78,7 +78,6 @@ pub fn build_window<E>(
|
||||
|
||||
let mut window_builder = winit::window::WindowBuilder::new()
|
||||
.with_title(title)
|
||||
.with_always_on_top(*always_on_top)
|
||||
.with_decorations(*decorated)
|
||||
.with_fullscreen(fullscreen.then(|| winit::window::Fullscreen::Borderless(None)))
|
||||
.with_maximized(*maximized)
|
||||
@@ -143,7 +142,16 @@ pub fn build_window<E>(
|
||||
}
|
||||
}
|
||||
|
||||
window_builder.build(event_loop)
|
||||
let window = window_builder.build(event_loop)?;
|
||||
|
||||
use winit::window::WindowLevel;
|
||||
window.set_window_level(if *always_on_top {
|
||||
WindowLevel::AlwaysOnTop
|
||||
} else {
|
||||
WindowLevel::Normal
|
||||
});
|
||||
|
||||
Ok(window)
|
||||
}
|
||||
|
||||
fn largest_monitor_point_size<E>(event_loop: &EventLoopWindowTarget<E>) -> egui::Vec2 {
|
||||
@@ -235,7 +243,12 @@ pub fn handle_app_output(
|
||||
}
|
||||
|
||||
if let Some(always_on_top) = always_on_top {
|
||||
window.set_always_on_top(always_on_top);
|
||||
use winit::window::WindowLevel;
|
||||
window.set_window_level(if always_on_top {
|
||||
WindowLevel::AlwaysOnTop
|
||||
} else {
|
||||
WindowLevel::Normal
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@ mod glow_integration {
|
||||
// try egl and fallback to x11 glx
|
||||
#[cfg(target_os = "linux")]
|
||||
let preference = glutin::display::DisplayApiPreference::EglThenGlx(Box::new(
|
||||
winit::platform::unix::register_xlib_error_hook,
|
||||
winit::platform::x11::register_xlib_error_hook,
|
||||
));
|
||||
#[cfg(target_os = "macos")]
|
||||
let preference = glutin::display::DisplayApiPreference::Cgl;
|
||||
|
||||
Reference in New Issue
Block a user