-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window contents can sometimes be affected by mouse interaction outside the window #4349
Comments
It would be good for emilk to fix this. This is a problem that has existed for a long time. The area of It will be easier to check the problem using the example below. struct TestApp;
impl eframe::App for TestApp {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
egui::Window::new("test")
.scroll(true)
.resizable(true)
.show(ctx, |ui| {
ui.label("looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong");
ui.collapsing(
"looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong",
|_ui| {},
);
});
egui::CentralPanel::default().show(ctx, |ui| {
ctx.options_mut(|options| {
options.tessellation_options.debug_paint_clip_rects = true;
});
ctx.settings_ui(ui);
});
}
}
fn main() {
let _result = eframe::run_native(
"Test",
Default::default(),
Box::new(|_cc| Box::new(TestApp)),
);
} |
I will solve this and submit a Pull Request, soon. |
I have updated the code to reproduce the issue, turns out that all that is needed is something that allocates space within a window. |
@emilk It seems that the |
Yup, somewhere the |
egui version 0.27.2, also present on master
Describe the bug
Interactions outside a window can sometimes interact with elements inside the window if they allocate enough space.
To Reproduce
Expected behavior
The drag affects whatever is inside the window.
Screenshots
demo.mp4
The text was updated successfully, but these errors were encountered: