Open barries opened 1 month ago
Please see below.
let outer_rect = ui
.ctx()
.input(|i| i.viewport().outer_rect.unwrap_or(egui::Rect::ZERO));
let inner_rect = ui
.ctx()
.input(|i| i.viewport().inner_rect.unwrap_or(egui::Rect::ZERO));
Thanks for the workarounds!
This is still a discrepancy between the docs and implementation.
Describe the bug According to the docs: InputState.screen_rect: Position and size of the egui area.
However, this code:
...always reports an origin of
[0.0 0.0]
when dragging the window:To Reproduce Steps to reproduce the behavior:
eframe_template
Expected behavior The reported origin is the actual origin, and changes when the window is moved, maximized, full-screened, restored, minimized, etc.
Screenshots
Desktop (please complete the following information):
egui
,eframe
are0.28.1
Smartphone (please complete the following information):
Additional context