From 403bc64d05f76111b25e63ff21d0483dc86d4717 Mon Sep 17 00:00:00 2001 From: guillaume Date: Mon, 30 Oct 2023 10:01:22 +0100 Subject: [PATCH 01/13] Implemented window header color changed when focused (on top). * Added a theme color for selected window header. * Added a function to retrieve the LayerId of the focused window. * Implemented a simple demo of this function in the demo app where a message states if the Option window is focused (at the bottom of the Options window). --- crates/egui/src/containers/frame.rs | 7 ++++ crates/egui/src/containers/window.rs | 39 +++++++++++++++---- crates/egui/src/context.rs | 5 +++ crates/egui/src/memory.rs | 10 ++++- crates/egui/src/style.rs | 11 ++++++ .../egui_demo_lib/src/demo/window_options.rs | 11 ++---- 6 files changed, 67 insertions(+), 16 deletions(-) diff --git a/crates/egui/src/containers/frame.rs b/crates/egui/src/containers/frame.rs index 6ce5cbc408e..c7579f0e6a6 100644 --- a/crates/egui/src/containers/frame.rs +++ b/crates/egui/src/containers/frame.rs @@ -29,6 +29,8 @@ pub struct Frame { pub fill: Color32, + pub selected_header_color: Color32, + pub stroke: Stroke, } @@ -69,6 +71,7 @@ impl Frame { rounding: style.visuals.window_rounding, shadow: style.visuals.window_shadow, fill: style.visuals.window_fill(), + selected_header_color: style.visuals.window_selected_header_color(), stroke: style.visuals.window_stroke(), ..Default::default() } @@ -80,6 +83,7 @@ impl Frame { rounding: style.visuals.menu_rounding, shadow: style.visuals.popup_shadow, fill: style.visuals.window_fill(), + selected_header_color: style.visuals.window_selected_header_color(), stroke: style.visuals.window_stroke(), ..Default::default() } @@ -91,6 +95,7 @@ impl Frame { rounding: style.visuals.menu_rounding, shadow: style.visuals.popup_shadow, fill: style.visuals.window_fill(), + selected_header_color: style.visuals.window_selected_header_color(), stroke: style.visuals.window_stroke(), ..Default::default() } @@ -105,6 +110,7 @@ impl Frame { inner_margin: Margin::same(2.0), rounding: style.visuals.widgets.noninteractive.rounding, fill: style.visuals.extreme_bg_color, + selected_header_color: style.visuals.window_selected_header_color(), stroke: style.visuals.window_stroke(), ..Default::default() } @@ -232,6 +238,7 @@ impl Frame { rounding, shadow, fill, + selected_header_color: _, stroke, } = *self; diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index c12199d40ac..ee87e92ddab 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -350,10 +350,19 @@ impl<'open> Window<'open> { let resize = resize.resizable(false); // We move it manually let mut resize = resize.id(resize_id); + let on_top = Some(area_layer_id) == ctx.get_top_layer_id(); let mut area = area.begin(ctx); let title_content_spacing = 2.0 * ctx.style().spacing.item_spacing.y; + // Calculate roughly how much larger the window size is compared to the inner rect + let title_bar_height = if with_title_bar { + let style = ctx.style(); + ctx.fonts(|f| title.font_height(f, &style)) + title_content_spacing * 2.0 + } else { + 0.0 + }; + // First interact (move etc) to avoid frame delay: let last_frame_outer_rect = area.state().rect(); let interaction = if possible.movable || possible.resizable() { @@ -365,13 +374,6 @@ impl<'open> Window<'open> { last_frame_outer_rect, ) .and_then(|window_interaction| { - // Calculate roughly how much larger the window size is compared to the inner rect - let title_bar_height = if with_title_bar { - let style = ctx.style(); - ctx.fonts(|f| title.font_height(f, &style)) + title_content_spacing - } else { - 0.0 - }; let margins = frame.outer_margin.sum() + frame.inner_margin.sum() + vec2(0.0, title_bar_height); @@ -434,6 +436,29 @@ impl<'open> Window<'open> { // END FRAME -------------------------------- if let Some(title_bar) = title_bar { + if on_top { + let rect = Rect::from_min_size( + outer_rect.min, + Vec2 { + x: outer_rect.size().x, + y: title_bar_height, + }, + ); + let mut round = area_content_ui.visuals().window_rounding; + if !is_collapsed { + round.se = 0.0; + round.sw = 0.0; + } + let (r, g, b, _) = area_content_ui + .visuals() + .window_selected_header_color() + .to_tuple(); + let selected_color = Color32::from_rgba_unmultiplied(r, g, b, 128); + + area_content_ui + .painter() + .rect_filled(rect, round, selected_color); + }; title_bar.ui( &mut area_content_ui, outer_rect, diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 27060021bd5..10d22dd1213 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -1519,6 +1519,11 @@ impl Context { self.memory_mut(|mem| mem.areas.move_to_top(layer_id)); } + /// Retrieve the `LayerId` of the top level windows. + pub fn get_top_layer_id(&self) -> Option { + self.memory(|mem| mem.areas.get_top_layer_id(Order::Middle)) + } + pub(crate) fn rect_contains_pointer(&self, layer_id: LayerId, rect: Rect) -> bool { rect.is_positive() && { let pointer_pos = self.input(|i| i.pointer.interact_pos()); diff --git a/crates/egui/src/memory.rs b/crates/egui/src/memory.rs index 2c56d967248..c2626211dee 100644 --- a/crates/egui/src/memory.rs +++ b/crates/egui/src/memory.rs @@ -2,7 +2,7 @@ use epaint::{emath::Rangef, vec2, Vec2}; -use crate::{area, window, EventFilter, Id, IdMap, InputState, LayerId, Pos2, Rect, Style}; +use crate::{area, window, EventFilter, Id, IdMap, InputState, LayerId, Order, Pos2, Rect, Style}; // ---------------------------------------------------------------------------- @@ -819,6 +819,14 @@ impl Areas { } } + pub fn get_top_layer_id(&self, order: Order) -> Option { + self.order + .iter() + .filter(|layer| layer.order == order) + .last() + .copied() + } + pub(crate) fn end_frame(&mut self) { let Self { visible_last_frame, diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index 3c44b292a6c..a5ba74e20c6 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -511,6 +511,7 @@ pub struct Visuals { pub window_rounding: Rounding, pub window_shadow: Shadow, + pub window_selected_header_color: Color32, pub window_fill: Color32, pub window_stroke: Stroke, @@ -587,6 +588,12 @@ impl Visuals { self.window_fill } + /// Window selected header color. + #[inline(always)] + pub fn window_selected_header_color(&self) -> Color32 { + self.window_selected_header_color + } + #[inline(always)] pub fn window_stroke(&self) -> Stroke { self.window_stroke @@ -845,6 +852,7 @@ impl Visuals { window_rounding: Rounding::same(6.0), window_shadow: Shadow::big_dark(), window_fill: Color32::from_gray(27), + window_selected_header_color: Color32::from_gray(64), window_stroke: Stroke::new(1.0, Color32::from_gray(60)), menu_rounding: Rounding::same(6.0), @@ -885,6 +893,7 @@ impl Visuals { window_shadow: Shadow::big_light(), window_fill: Color32::from_gray(248), + window_selected_header_color: Color32::from_gray(230), window_stroke: Stroke::new(1.0, Color32::from_gray(190)), panel_fill: Color32::from_gray(248), @@ -1421,6 +1430,7 @@ impl Visuals { window_rounding, window_shadow, window_fill, + window_selected_header_color, window_stroke, menu_rounding, @@ -1448,6 +1458,7 @@ impl Visuals { ui.collapsing("Background Colors", |ui| { ui_color(ui, &mut widgets.inactive.weak_bg_fill, "Buttons"); ui_color(ui, window_fill, "Windows"); + ui_color(ui, window_selected_header_color, "Selected window"); ui_color(ui, panel_fill, "Panels"); ui_color(ui, faint_bg_color, "Faint accent").on_hover_text( "Used for faint accentuation of interactive things, like striped grids.", diff --git a/crates/egui_demo_lib/src/demo/window_options.rs b/crates/egui_demo_lib/src/demo/window_options.rs index a69f6cf7929..e034dc923df 100644 --- a/crates/egui_demo_lib/src/demo/window_options.rs +++ b/crates/egui_demo_lib/src/demo/window_options.rs @@ -6,7 +6,6 @@ pub struct WindowOptions { closable: bool, collapsible: bool, resizable: bool, - constrain: bool, scroll2: [bool; 2], disabled_time: f64, @@ -23,7 +22,6 @@ impl Default for WindowOptions { closable: true, collapsible: true, resizable: true, - constrain: true, scroll2: [true; 2], disabled_time: f64::NEG_INFINITY, anchored: false, @@ -45,7 +43,6 @@ impl super::Demo for WindowOptions { closable, collapsible, resizable, - constrain, scroll2, disabled_time, anchored, @@ -62,7 +59,6 @@ impl super::Demo for WindowOptions { let mut window = egui::Window::new(title) .id(egui::Id::new("demo_window_options")) // required since we change the title .resizable(resizable) - .constrain(constrain) .collapsible(collapsible) .title_bar(title_bar) .scroll2(scroll2) @@ -85,7 +81,6 @@ impl super::View for WindowOptions { closable, collapsible, resizable, - constrain, scroll2, disabled_time: _, anchored, @@ -104,8 +99,6 @@ impl super::View for WindowOptions { ui.checkbox(closable, "closable"); ui.checkbox(collapsible, "collapsible"); ui.checkbox(resizable, "resizable"); - ui.checkbox(constrain, "constrain") - .on_hover_text("Constrain window to the screen"); ui.checkbox(&mut scroll2[0], "hscroll"); ui.checkbox(&mut scroll2[1], "vscroll"); }); @@ -136,7 +129,9 @@ impl super::View for WindowOptions { }); ui.separator(); - + let pipo = Some(ui.layer_id()) == ui.ctx().get_top_layer_id(); + ui.label(format!("This window has focus: {pipo}.")); + ui.separator(); ui.horizontal(|ui| { if ui.button("Disable for 2 seconds").clicked() { self.disabled_time = ui.input(|i| i.time); From 03e6114b64a1f9d82bfea00a762f294b3c12e108 Mon Sep 17 00:00:00 2001 From: guillaume Date: Mon, 30 Oct 2023 10:14:07 +0100 Subject: [PATCH 02/13] Changed the color of the focused header for light theme. --- crates/egui/src/style.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index a5ba74e20c6..3ec514cd2a4 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -893,7 +893,7 @@ impl Visuals { window_shadow: Shadow::big_light(), window_fill: Color32::from_gray(248), - window_selected_header_color: Color32::from_gray(230), + window_selected_header_color: Color32::from_rgb(32, 64, 255), window_stroke: Stroke::new(1.0, Color32::from_gray(190)), panel_fill: Color32::from_gray(248), From e24c999a8044cfc71dac17265bf1989873eba97f Mon Sep 17 00:00:00 2001 From: Guillaume Schmid Date: Fri, 10 Nov 2023 16:30:27 +0100 Subject: [PATCH 03/13] Update crates/egui/src/memory.rs Co-authored-by: Emil Ernerfeldt --- crates/egui/src/memory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/memory.rs b/crates/egui/src/memory.rs index c2626211dee..f357e54d0b1 100644 --- a/crates/egui/src/memory.rs +++ b/crates/egui/src/memory.rs @@ -819,7 +819,7 @@ impl Areas { } } - pub fn get_top_layer_id(&self, order: Order) -> Option { + pub fn top_layer_id(&self, order: Order) -> Option { self.order .iter() .filter(|layer| layer.order == order) From f0e2888739896ea99d484227ba43d67e242e1a5a Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 10 Nov 2023 16:50:07 +0100 Subject: [PATCH 04/13] Changed the color of the focused header for light theme. --- crates/egui/src/containers/frame.rs | 4 ---- crates/egui/src/containers/window.rs | 2 +- crates/egui/src/style.rs | 11 ----------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/crates/egui/src/containers/frame.rs b/crates/egui/src/containers/frame.rs index c7579f0e6a6..25c601fbbdb 100644 --- a/crates/egui/src/containers/frame.rs +++ b/crates/egui/src/containers/frame.rs @@ -71,7 +71,6 @@ impl Frame { rounding: style.visuals.window_rounding, shadow: style.visuals.window_shadow, fill: style.visuals.window_fill(), - selected_header_color: style.visuals.window_selected_header_color(), stroke: style.visuals.window_stroke(), ..Default::default() } @@ -83,7 +82,6 @@ impl Frame { rounding: style.visuals.menu_rounding, shadow: style.visuals.popup_shadow, fill: style.visuals.window_fill(), - selected_header_color: style.visuals.window_selected_header_color(), stroke: style.visuals.window_stroke(), ..Default::default() } @@ -95,7 +93,6 @@ impl Frame { rounding: style.visuals.menu_rounding, shadow: style.visuals.popup_shadow, fill: style.visuals.window_fill(), - selected_header_color: style.visuals.window_selected_header_color(), stroke: style.visuals.window_stroke(), ..Default::default() } @@ -110,7 +107,6 @@ impl Frame { inner_margin: Margin::same(2.0), rounding: style.visuals.widgets.noninteractive.rounding, fill: style.visuals.extreme_bg_color, - selected_header_color: style.visuals.window_selected_header_color(), stroke: style.visuals.window_stroke(), ..Default::default() } diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index ee87e92ddab..0bd60437106 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -451,7 +451,7 @@ impl<'open> Window<'open> { } let (r, g, b, _) = area_content_ui .visuals() - .window_selected_header_color() + .widgets.hovered.bg_fill .to_tuple(); let selected_color = Color32::from_rgba_unmultiplied(r, g, b, 128); diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index 3ec514cd2a4..3c44b292a6c 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -511,7 +511,6 @@ pub struct Visuals { pub window_rounding: Rounding, pub window_shadow: Shadow, - pub window_selected_header_color: Color32, pub window_fill: Color32, pub window_stroke: Stroke, @@ -588,12 +587,6 @@ impl Visuals { self.window_fill } - /// Window selected header color. - #[inline(always)] - pub fn window_selected_header_color(&self) -> Color32 { - self.window_selected_header_color - } - #[inline(always)] pub fn window_stroke(&self) -> Stroke { self.window_stroke @@ -852,7 +845,6 @@ impl Visuals { window_rounding: Rounding::same(6.0), window_shadow: Shadow::big_dark(), window_fill: Color32::from_gray(27), - window_selected_header_color: Color32::from_gray(64), window_stroke: Stroke::new(1.0, Color32::from_gray(60)), menu_rounding: Rounding::same(6.0), @@ -893,7 +885,6 @@ impl Visuals { window_shadow: Shadow::big_light(), window_fill: Color32::from_gray(248), - window_selected_header_color: Color32::from_rgb(32, 64, 255), window_stroke: Stroke::new(1.0, Color32::from_gray(190)), panel_fill: Color32::from_gray(248), @@ -1430,7 +1421,6 @@ impl Visuals { window_rounding, window_shadow, window_fill, - window_selected_header_color, window_stroke, menu_rounding, @@ -1458,7 +1448,6 @@ impl Visuals { ui.collapsing("Background Colors", |ui| { ui_color(ui, &mut widgets.inactive.weak_bg_fill, "Buttons"); ui_color(ui, window_fill, "Windows"); - ui_color(ui, window_selected_header_color, "Selected window"); ui_color(ui, panel_fill, "Panels"); ui_color(ui, faint_bg_color, "Faint accent").on_hover_text( "Used for faint accentuation of interactive things, like striped grids.", From a5359c6d8720dee4552e6d195f1d5a34206d441f Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 10 Nov 2023 17:02:56 +0100 Subject: [PATCH 05/13] Changed the color of the focused header for light theme. --- crates/egui_demo_lib/src/demo/window_options.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/egui_demo_lib/src/demo/window_options.rs b/crates/egui_demo_lib/src/demo/window_options.rs index e034dc923df..f2c945c4f1a 100644 --- a/crates/egui_demo_lib/src/demo/window_options.rs +++ b/crates/egui_demo_lib/src/demo/window_options.rs @@ -6,6 +6,7 @@ pub struct WindowOptions { closable: bool, collapsible: bool, resizable: bool, + constrain: bool, scroll2: [bool; 2], disabled_time: f64, @@ -22,6 +23,7 @@ impl Default for WindowOptions { closable: true, collapsible: true, resizable: true, + constrain: true, scroll2: [true; 2], disabled_time: f64::NEG_INFINITY, anchored: false, @@ -43,6 +45,7 @@ impl super::Demo for WindowOptions { closable, collapsible, resizable, + constrain, scroll2, disabled_time, anchored, @@ -59,6 +62,7 @@ impl super::Demo for WindowOptions { let mut window = egui::Window::new(title) .id(egui::Id::new("demo_window_options")) // required since we change the title .resizable(resizable) + .constrain(constrain) .collapsible(collapsible) .title_bar(title_bar) .scroll2(scroll2) @@ -81,6 +85,7 @@ impl super::View for WindowOptions { closable, collapsible, resizable, + constrain, scroll2, disabled_time: _, anchored, @@ -99,6 +104,8 @@ impl super::View for WindowOptions { ui.checkbox(closable, "closable"); ui.checkbox(collapsible, "collapsible"); ui.checkbox(resizable, "resizable"); + ui.checkbox(constrain, "constrain") + .on_hover_text("Constrain window to the screen"); ui.checkbox(&mut scroll2[0], "hscroll"); ui.checkbox(&mut scroll2[1], "vscroll"); }); @@ -129,8 +136,9 @@ impl super::View for WindowOptions { }); ui.separator(); - let pipo = Some(ui.layer_id()) == ui.ctx().get_top_layer_id(); - ui.label(format!("This window has focus: {pipo}.")); + let on_top = Some(ui.layer_id()) == ui.ctx().get_top_layer_id(); + ui.label(format!("This window is on top: {on_top}.")); + ui.separator(); ui.horizontal(|ui| { if ui.button("Disable for 2 seconds").clicked() { From d094710bbd4428d88dab1e0d44b5723a204f1bff Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 10 Nov 2023 17:05:57 +0100 Subject: [PATCH 06/13] Fixed window option demo. * Corrected wording (use "on_top" instead of "focus"). * put back the constraint demo (I don't understand why it disappeared, but the tree was not in sync). --- crates/egui/src/context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 408cc3ef3ce..082b7ad8869 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -1520,7 +1520,7 @@ impl Context { /// Retrieve the `LayerId` of the top level windows. pub fn get_top_layer_id(&self) -> Option { - self.memory(|mem| mem.areas.get_top_layer_id(Order::Middle)) + self.memory(|mem| mem.areas.top_layer_id(Order::Middle)) } pub(crate) fn rect_contains_pointer(&self, layer_id: LayerId, rect: Rect) -> bool { From e6aa85deed268d32eb4902e55e27a1a30a657cb7 Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 10 Nov 2023 17:20:16 +0100 Subject: [PATCH 07/13] Removed the transparency hack for the header of window on top. --- crates/egui/src/containers/window.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index 865779f4afb..49aac3ad3b9 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -400,6 +400,9 @@ impl<'open> Window<'open> { let mut frame = frame.begin(&mut area_content_ui); let show_close_button = open.is_some(); + + let where_to_put_header_background = &area_content_ui.painter().add(Shape::Noop); + let title_bar = if with_title_bar { let title_bar = show_title_bar( &mut frame.content_ui, @@ -449,16 +452,16 @@ impl<'open> Window<'open> { round.se = 0.0; round.sw = 0.0; } - let (r, g, b, _) = area_content_ui + let header_color = area_content_ui .visuals() - .widgets.hovered.bg_fill - .to_tuple(); - let selected_color = Color32::from_rgba_unmultiplied(r, g, b, 128); + .widgets.hovered.bg_fill; area_content_ui .painter() - .rect_filled(rect, round, selected_color); + .set(*where_to_put_header_background, + RectShape::filled(rect, round, header_color)); }; + title_bar.ui( &mut area_content_ui, outer_rect, From d04d8b41eb8e703e2e953dcba5eb91444959e53f Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 10 Nov 2023 17:52:11 +0100 Subject: [PATCH 08/13] Fix code style. --- crates/egui/src/containers/window.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index 49aac3ad3b9..0db39f5f446 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -452,14 +452,12 @@ impl<'open> Window<'open> { round.se = 0.0; round.sw = 0.0; } - let header_color = area_content_ui - .visuals() - .widgets.hovered.bg_fill; - - area_content_ui - .painter() - .set(*where_to_put_header_background, - RectShape::filled(rect, round, header_color)); + let header_color = area_content_ui.visuals().widgets.hovered.bg_fill; + + area_content_ui.painter().set( + *where_to_put_header_background, + RectShape::filled(rect, round, header_color), + ); }; title_bar.ui( From 04261e4919531609fa6d2493ac61cbe0e363a6d3 Mon Sep 17 00:00:00 2001 From: guillaume Date: Sat, 11 Nov 2023 12:56:38 +0100 Subject: [PATCH 09/13] Removed unused code. --- crates/egui/src/containers/frame.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/egui/src/containers/frame.rs b/crates/egui/src/containers/frame.rs index 25c601fbbdb..6ce5cbc408e 100644 --- a/crates/egui/src/containers/frame.rs +++ b/crates/egui/src/containers/frame.rs @@ -29,8 +29,6 @@ pub struct Frame { pub fill: Color32, - pub selected_header_color: Color32, - pub stroke: Stroke, } @@ -234,7 +232,6 @@ impl Frame { rounding, shadow, fill, - selected_header_color: _, stroke, } = *self; From 9db9797600037e0059a3618af05380577279c149 Mon Sep 17 00:00:00 2001 From: guillaume Date: Thu, 23 Nov 2023 13:09:15 +0100 Subject: [PATCH 10/13] Sync with main. --- crates/egui/src/context.rs | 2 +- crates/egui/src/memory.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index cf979f54961..a2ce2e978ee 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -1907,7 +1907,7 @@ impl Context { /// Retrieve the `LayerId` of the top level windows. pub fn get_top_layer_id(&self) -> Option { - self.memory(|mem| mem.areas.top_layer_id(Order::Middle)) + self.memory(|mem| mem.areas().top_layer_id(Order::Middle)) } pub(crate) fn rect_contains_pointer(&self, layer_id: LayerId, rect: Rect) -> bool { diff --git a/crates/egui/src/memory.rs b/crates/egui/src/memory.rs index a269ff700c9..754f33bf3f6 100644 --- a/crates/egui/src/memory.rs +++ b/crates/egui/src/memory.rs @@ -5,8 +5,8 @@ use epaint::{emath::Rangef, vec2, Vec2}; use crate::{ area, window::{self, WindowInteraction}, - EventFilter, Id, IdMap, InputState, LayerId, Pos2, Rect, Style, ViewportId, ViewportIdMap, - ViewportIdSet, + EventFilter, Id, IdMap, InputState, LayerId, Order, Pos2, Rect, Style, ViewportId, + ViewportIdMap, ViewportIdSet, }; // ---------------------------------------------------------------------------- From 4f0cc5bc1c8fb38dc896c69dadb3459b91628a89 Mon Sep 17 00:00:00 2001 From: Guillaume Schmid Date: Sun, 7 Jan 2024 13:35:29 +0100 Subject: [PATCH 11/13] Update crates/egui/src/context.rs Co-authored-by: Emil Ernerfeldt --- crates/egui/src/context.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index a2ce2e978ee..9e8e9000817 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -1905,8 +1905,8 @@ impl Context { self.memory_mut(|mem| mem.areas_mut().move_to_top(layer_id)); } - /// Retrieve the `LayerId` of the top level windows. - pub fn get_top_layer_id(&self) -> Option { + /// Retrieve the [`LayerId`] of the top level windows. + pub fn top_layer_id(&self) -> Option { self.memory(|mem| mem.areas().top_layer_id(Order::Middle)) } From b848c2b2b15c6c600f9d9c58215872b45f41a767 Mon Sep 17 00:00:00 2001 From: guillaume Date: Sun, 7 Jan 2024 13:55:28 +0100 Subject: [PATCH 12/13] Fixed get_top_layer() -> top_layer() function call. --- crates/egui/src/containers/window.rs | 2 +- crates/egui_demo_lib/src/demo/window_options.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/egui/src/containers/window.rs b/crates/egui/src/containers/window.rs index 63a28dca967..30adc6c08dd 100644 --- a/crates/egui/src/containers/window.rs +++ b/crates/egui/src/containers/window.rs @@ -412,7 +412,7 @@ impl<'open> Window<'open> { let resize = resize.resizable(false); // We move it manually let mut resize = resize.id(resize_id); - let on_top = Some(area_layer_id) == ctx.get_top_layer_id(); + let on_top = Some(area_layer_id) == ctx.top_layer_id(); let mut area = area.begin(ctx); let title_content_spacing = 2.0 * ctx.style().spacing.item_spacing.y; diff --git a/crates/egui_demo_lib/src/demo/window_options.rs b/crates/egui_demo_lib/src/demo/window_options.rs index 93275ea8121..baa6eac652e 100644 --- a/crates/egui_demo_lib/src/demo/window_options.rs +++ b/crates/egui_demo_lib/src/demo/window_options.rs @@ -138,7 +138,7 @@ impl super::View for WindowOptions { }); ui.separator(); - let on_top = Some(ui.layer_id()) == ui.ctx().get_top_layer_id(); + let on_top = Some(ui.layer_id()) == ui.ctx().top_layer_id(); ui.label(format!("This window is on top: {on_top}.")); ui.separator(); From 8c0548779aeeecfa70a223ef2733b69853ef0000 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 7 Jan 2024 16:45:50 +0100 Subject: [PATCH 13/13] Revert change to Cargo.lock --- Cargo.lock | 360 ++++++++++++++++++----------------------------------- 1 file changed, 122 insertions(+), 238 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5d132980b3f..2af3e808849 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.12.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb10ed32c63247e4e39a8f42e8e30fb9442fbf7878c8e4a9849e7e381619bea" +checksum = "ca8410747ed85a17c4a1e9ed3f5a74d3e7bdcc876cf9a18ff40ae21d645997b2" dependencies = [ "enumn", "serde", @@ -51,13 +51,13 @@ dependencies = [ [[package]] name = "accesskit_unix" -version = "0.6.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f46c18d99ba61ad7123dd13eeb0c104436ab6af1df6a1cd8c11054ed394a08" +checksum = "6c8c9b4467d77cacfbc93cee9aa8e7822f6d527c774efdca5f8b3a5280c34847" dependencies = [ "accesskit", "accesskit_consumer", - "async-channel 2.1.1", + "async-channel", "async-once-cell", "atspi", "futures-lite", @@ -139,9 +139,9 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "android-activity" -version = "0.5.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b801912a977c3fd52d80511fe1c0c8480c6f957f21ae2ce1b92ffe970cf4b9" +checksum = "052ad56e336bcc615a214bffbeca6c181ee9550acec193f0327e0b103b033a4d" dependencies = [ "android-properties", "bitflags 2.4.0", @@ -199,9 +199,9 @@ checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arboard" -version = "3.2.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac57f2b058a76363e357c056e4f74f1945bf734d37b8b3ef49066c4787dde0fc" +checksum = "aafb29b107435aa276664c1db8954ac27a6e105cdad3c88287a199eb0e313c08" dependencies = [ "clipboard-win", "log", @@ -211,7 +211,7 @@ dependencies = [ "parking_lot", "thiserror", "winapi", - "x11rb 0.10.1", + "x11rb 0.12.0", ] [[package]] @@ -228,9 +228,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "as-raw-xcb-connection" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" +checksum = "2d5f312b0a56c5cdf967c0aeb67f6289603354951683bc97ddc595ab974ba9aa" [[package]] name = "ash" @@ -262,19 +262,6 @@ dependencies = [ "futures-core", ] -[[package]] -name = "async-channel" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" -dependencies = [ - "concurrent-queue", - "event-listener 4.0.3", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - [[package]] name = "async-executor" version = "1.5.3" @@ -349,7 +336,7 @@ dependencies = [ "cfg-if", "event-listener 3.0.0", "futures-lite", - "rustix 0.38.28", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -558,11 +545,11 @@ dependencies = [ [[package]] name = "block-sys" -version = "0.2.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" +checksum = "2dd7cf50912cddc06dc5ea7c08c5e81c1b2c842a70d19def1848d54c586fed92" dependencies = [ - "objc-sys 0.3.2", + "objc-sys 0.3.1", ] [[package]] @@ -581,7 +568,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" dependencies = [ - "block-sys 0.2.1", + "block-sys 0.2.0", "objc2 0.4.1", ] @@ -591,7 +578,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94c4ef1f913d78636d78d538eec1f18de81e481f44b1be0a81060090530846e1" dependencies = [ - "async-channel 1.9.0", + "async-channel", "async-lock", "async-task", "fastrand 2.0.1", @@ -657,8 +644,8 @@ checksum = "7b50b5a44d59a98c55a9eeb518f39bf7499ba19fd98ee7d22618687f3f10adbf" dependencies = [ "bitflags 2.4.0", "log", - "polling 3.3.1", - "rustix 0.38.28", + "polling 3.3.0", + "rustix 0.38.21", "slab", "thiserror", ] @@ -670,7 +657,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" dependencies = [ "calloop", - "rustix 0.38.28", + "rustix 0.38.21", "wayland-backend", "wayland-client", ] @@ -777,18 +764,18 @@ checksum = "7a0e87cdf78571d9fbeff16861c37a006cd718d2433dc6d5b80beaae367d899a" [[package]] name = "clap" -version = "4.4.13" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52bdc885e4cacc7f7c9eedc1ef6da641603180c783c41a15c264944deeaab642" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.4.12" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" dependencies = [ "anstyle", "clap_lex", @@ -1083,9 +1070,12 @@ checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] [[package]] name = "derivative" @@ -1325,7 +1315,7 @@ dependencies = [ "glutin", "glutin-winit", "log", - "memoffset 0.7.1", + "memoffset", "puffin", "raw-window-handle 0.5.2", "wasm-bindgen", @@ -1462,12 +1452,23 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ + "cc", "libc", - "windows-sys 0.52.0", ] [[package]] @@ -1497,27 +1498,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - [[package]] name = "fancy-regex" version = "0.11.0" @@ -1728,9 +1708,9 @@ dependencies = [ [[package]] name = "gethostname" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" dependencies = [ "libc", "winapi", @@ -1813,9 +1793,9 @@ dependencies = [ [[package]] name = "glutin" -version = "0.31.2" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "005459a22af86adc706522d78d360101118e2638ec21df3852fcc626e0dbb212" +checksum = "eca18d477e18c996c1fd1a50e04c6a745b67e2d512c7fb51f2757d9486a0e3ee" dependencies = [ "bitflags 2.4.0", "cfg_aliases", @@ -1928,7 +1908,7 @@ checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ "bitflags 2.4.0", "gpu-descriptor-types", - "hashbrown 0.14.0", + "hashbrown", ] [[package]] @@ -1966,15 +1946,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "allocator-api2", @@ -2136,22 +2110,12 @@ checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown", ] [[package]] @@ -2181,7 +2145,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.28", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -2282,9 +2246,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.152" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" @@ -2329,9 +2293,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "litrs" @@ -2378,22 +2342,13 @@ checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memmap2" -version = "0.9.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +checksum = "deaba38d7abf1d4cca21cc89e932e542ba2b9258664d2a9ef0e61512039c9375" dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.7.1" @@ -2466,15 +2421,15 @@ dependencies = [ [[package]] name = "naga" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61d829abac9f5230a85d8cc83ec0879b4c09790208ae25b5ea031ef84562e071" +checksum = "ae585df4b6514cf8842ac0f1ab4992edc975892704835b549cf818dc0191249e" dependencies = [ "bit-set", "bitflags 2.4.0", "codespan-reporting", "hexf-parse", - "indexmap 2.0.0", + "indexmap", "log", "num-traits", "rustc-hash", @@ -2524,18 +2479,6 @@ dependencies = [ "jni-sys", ] -[[package]] -name = "nix" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.6.5", -] - [[package]] name = "nix" version = "0.26.4" @@ -2545,7 +2488,7 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.7.1", + "memoffset", ] [[package]] @@ -2596,18 +2539,18 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2644,9 +2587,9 @@ checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" [[package]] name = "objc-sys" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459" +checksum = "99e1d07c6eab1ce8b6382b8e3c7246fe117ff3f8b34be065f5ebace6749fe845" [[package]] name = "objc2" @@ -2665,7 +2608,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" dependencies = [ - "objc-sys 0.3.2", + "objc-sys 0.3.1", "objc2-encode 3.0.0", ] @@ -2841,14 +2784,14 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plist" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" +checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" dependencies = [ "base64", - "indexmap 1.9.3", + "indexmap", "line-wrap", - "quick-xml 0.29.0", + "quick-xml 0.31.0", "serde", "time", ] @@ -2894,16 +2837,16 @@ dependencies = [ [[package]] name = "polling" -version = "3.3.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.28", + "rustix 0.38.21", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] @@ -2912,6 +2855,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2989,18 +2938,18 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" dependencies = [ "memchr", ] [[package]] name = "quick-xml" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" dependencies = [ "memchr", ] @@ -3241,15 +3190,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.12", - "windows-sys 0.52.0", + "linux-raw-sys 0.4.11", + "windows-sys 0.48.0", ] [[package]] @@ -3487,7 +3436,7 @@ dependencies = [ "libc", "log", "memmap2", - "rustix 0.38.28", + "rustix 0.38.21", "thiserror", "wayland-backend", "wayland-client", @@ -3656,7 +3605,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.28", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -3707,12 +3656,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "powerfmt", "serde", "time-core", "time-macros", @@ -3811,7 +3761,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap", "serde", "serde_spanned", "toml_datetime", @@ -4128,7 +4078,7 @@ checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" dependencies = [ "cc", "downcast-rs", - "nix 0.26.4", + "nix", "scoped-tls", "smallvec", "wayland-sys", @@ -4141,7 +4091,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" dependencies = [ "bitflags 2.4.0", - "nix 0.26.4", + "nix", "wayland-backend", "wayland-scanner", ] @@ -4163,7 +4113,7 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b" dependencies = [ - "nix 0.26.4", + "nix", "wayland-client", "xcursor", ] @@ -4500,15 +4450,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - [[package]] name = "windows-targets" version = "0.42.2" @@ -4539,21 +4480,6 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -4566,12 +4492,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -4584,12 +4504,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -4602,12 +4516,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -4620,12 +4528,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -4638,12 +4540,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -4656,12 +4552,6 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -4674,17 +4564,11 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - [[package]] name = "winit" -version = "0.29.9" +version = "0.29.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2376dab13e09c01ad8b679f0dbc7038af4ec43d9a91344338e37bd686481550" +checksum = "7fd430cd4560ee9c48885a4ef473b609a56796e37b1e18222abee146143f7457" dependencies = [ "ahash", "android-activity", @@ -4710,7 +4594,7 @@ dependencies = [ "raw-window-handle 0.5.2", "raw-window-handle 0.6.0", "redox_syscall 0.3.5", - "rustix 0.38.28", + "rustix 0.38.21", "sctk-adwaita", "smithay-client-toolkit", "smol_str", @@ -4751,15 +4635,15 @@ dependencies = [ [[package]] name = "x11rb" -version = "0.10.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" +checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" dependencies = [ - "gethostname 0.2.3", - "nix 0.24.3", + "gethostname 0.3.0", + "nix", "winapi", "winapi-wsapoll", - "x11rb-protocol 0.10.0", + "x11rb-protocol 0.12.0", ] [[package]] @@ -4773,17 +4657,17 @@ dependencies = [ "libc", "libloading 0.8.0", "once_cell", - "rustix 0.38.28", + "rustix 0.38.21", "x11rb-protocol 0.13.0", ] [[package]] name = "x11rb-protocol" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" +checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" dependencies = [ - "nix 0.24.3", + "nix", ] [[package]] @@ -4807,7 +4691,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" dependencies = [ - "nix 0.26.4", + "nix", "winapi", ] @@ -4875,7 +4759,7 @@ dependencies = [ "futures-sink", "futures-util", "hex", - "nix 0.26.4", + "nix", "once_cell", "ordered-stream", "rand", @@ -4919,18 +4803,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.21" +version = "0.7.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686b7e407015242119c33dab17b8f61ba6843534de936d94368856528eae4dcc" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.21" +version = "0.7.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020f3dfe25dfc38dfea49ce62d5d45ecdd7f0d8a724fa63eb36b6eba4ec76806" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" dependencies = [ "proc-macro2", "quote",