emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
20.64k stars 1.49k forks source link

Fix custom_window_frame example #4647

Closed Gusted closed 1 week ago

Gusted commented 3 weeks ago

Using dragged_by caused the StartDrag command to be spammed, which in turn caused that you couldn't stop dragging the frame because the window was repeatly being told to start dragging. Use drag_started_by which will only send the StartDrag command once at the begin.

rustbasic commented 2 weeks ago

yes. It would be better to use drag_started_by().
On Windows, there is no problem using either drag_by() or drag_started_by().

emilk commented 1 week ago

Works on Mac.

Has this been tested on Linux and Windows?