From c2d37571f7a11411fde7a61fb395f55107886983 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Wed, 8 Feb 2023 10:02:50 +0100 Subject: [PATCH] constrain popups to the screen --- crates/egui/src/containers/popup.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/egui/src/containers/popup.rs b/crates/egui/src/containers/popup.rs index adb31ce6..e4ad1b13 100644 --- a/crates/egui/src/containers/popup.rs +++ b/crates/egui/src/containers/popup.rs @@ -260,8 +260,9 @@ fn show_tooltip_area_dyn<'c, R>( Area::new(area_id) .order(Order::Tooltip) .fixed_pos(window_pos) + .constrain(true) .interactable(false) - .drag_bounds(Rect::EVERYTHING) // disable clip rect + .drag_bounds(ctx.screen_rect()) .show(ctx, |ui| { Frame::popup(&ctx.style()) .show(ui, |ui| {