Skip to content

Commit b6d17ca

Browse files
committed
Move window resize interaction to be over contents
1 parent e0e372a commit b6d17ca

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

crates/egui/src/containers/window.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ impl Window<'_> {
542542

543543
// First check for resize to avoid frame delay:
544544
let last_frame_outer_rect = area.state().rect();
545-
let resize_interaction = resize_interaction(
545+
let resize_interaction = do_resize_interaction(
546546
ctx,
547547
possible,
548548
area.id(),
@@ -623,6 +623,17 @@ impl Window<'_> {
623623
.map_or((None, None), |ir| (Some(ir.inner), Some(ir.response)));
624624

625625
let outer_rect = frame.end(&mut area_content_ui).rect;
626+
627+
// Do resize interaction _again_, to move their widget rectangles on TOP of the rest of the window.
628+
let resize_interaction = do_resize_interaction(
629+
ctx,
630+
possible,
631+
area.id(),
632+
area_layer_id,
633+
last_frame_outer_rect,
634+
window_frame,
635+
);
636+
626637
paint_resize_corner(
627638
&area_content_ui,
628639
&possible,
@@ -924,7 +935,7 @@ fn move_and_resize_window(ctx: &Context, id: Id, interaction: &ResizeInteraction
924935
Some(rect.round_ui())
925936
}
926937

927-
fn resize_interaction(
938+
fn do_resize_interaction(
928939
ctx: &Context,
929940
possible: PossibleInteractions,
930941
_accessibility_parent: Id,

0 commit comments

Comments
 (0)