Improve Fl_Window::hotspot() when diverse screens have diverse scale factors.

This commit is contained in:
ManoloFLTK 2026-03-13 14:46:13 +01:00
parent 278e6eef6e
commit a342d9f3d5

View File

@ -23,6 +23,8 @@ void Fl_Window::hotspot(int X, int Y, int offscreen) {
// Update the screen position based on the mouse position.
Fl::get_mouse(mx,my);
// put the window on the mouse-containing screen
this->screen_num(Fl::screen_num(mx, my));
X = mx-X; Y = my-Y;
// If offscreen is 0 (the default), make sure that the window