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

Move new windows to the top

This commit is contained in:
Emil Ernerfeldt
2020-05-12 16:49:43 +02:00
parent e5c216447a
commit d508372334
4 changed files with 33 additions and 18 deletions

View File

@@ -155,7 +155,10 @@ impl Area {
// &format!("Area size: {:?}", state.size),
// );
if move_interact.active || mouse_pressed_on_area(ctx, layer) {
if move_interact.active
|| mouse_pressed_on_area(ctx, layer)
|| !ctx.memory().areas.visible_last_frame(&layer)
{
ctx.memory().areas.move_to_top(layer);
}
ctx.memory().areas.set_state(layer, state);