1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

Allow specifying override_redirect x11 window attribute (#7830)

This commit is contained in:
Ivor Wanders
2026-01-05 07:16:00 -05:00
committed by GitHub
parent 6d416fab2e
commit 0566fb17a5
2 changed files with 22 additions and 2 deletions

View File

@@ -1728,6 +1728,7 @@ pub fn create_winit_window_attributes(
// x11
window_type: _window_type,
override_redirect: _override_redirect,
mouse_passthrough: _, // handled in `apply_viewport_builder_to_window`
clamp_size_to_monitor_size: _, // Handled in `viewport_builder` in `epi_integration.rs`
@@ -1827,8 +1828,8 @@ pub fn create_winit_window_attributes(
#[cfg(all(feature = "x11", target_os = "linux"))]
{
use winit::platform::x11::WindowAttributesExtX11 as _;
if let Some(window_type) = _window_type {
use winit::platform::x11::WindowAttributesExtX11 as _;
use winit::platform::x11::WindowType;
window_attributes = window_attributes.with_x11_window_type(vec![match window_type {
egui::X11WindowType::Normal => WindowType::Normal,
@@ -1847,6 +1848,9 @@ pub fn create_winit_window_attributes(
egui::X11WindowType::Dnd => WindowType::Dnd,
}]);
}
if let Some(override_redirect) = _override_redirect {
window_attributes = window_attributes.with_override_redirect(override_redirect);
}
}
#[cfg(target_os = "windows")]