mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -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:
@@ -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