From fa7ab95d35659cd9f32c2358ff5e7984fb5ba8dc Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 21 May 2026 08:25:17 +0200 Subject: [PATCH] Fix "Windows: windows can show up on the wrong screen with the wrong scale" (#1437) --- src/Fl_win32.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 401a1aabe..f29408992 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -2261,10 +2261,7 @@ void Fl_WinAPI_Window_Driver::makeWindow() { nscreen = Fl_WinAPI_Window_Driver::driver(w)->screen_num_; else nscreen = Fl::screen_num(w->x(), w->y()); } else { - Fl_Window *hint = Fl::first_window(); - if (hint) { - nscreen = Fl_Window_Driver::driver(hint->top_window())->screen_num(); - } else if (Fl::screen_driver()->screen_count() > 1 ) { + if (Fl::screen_driver()->screen_count() > 1 ) { // put the new window on same screen as mouse int mx, my, X, Y, W, H; nscreen = Fl::screen_driver()->get_mouse(mx, my);