Menus on Windows appear on wrong position on a 4K display (#1376)

This commit is contained in:
ManoloFLTK 2026-03-09 18:10:08 +01:00
parent b67d4ef2dd
commit 43fded082b

View File

@ -1044,7 +1044,7 @@ void Menu_Window::autoscroll(item_index_t n) {
int Y = y()+Fl::box_dx(box())+2+n*item_height; int Y = y()+Fl::box_dx(box())+2+n*item_height;
int xx, ww; int xx, ww;
Fl_Window_Driver::driver(this)->menu_window_area(xx, scr_y, ww, scr_h, this->screen_num()); Fl_Window_Driver::driver(this)->menu_window_area(xx, scr_y, ww, scr_h, Fl::first_window()->screen_num());
if (n==0 && Y <= scr_y + item_height) { if (n==0 && Y <= scr_y + item_height) {
Y = scr_y - Y + 10; Y = scr_y - Y + 10;
} else if (Y <= scr_y + item_height) { } else if (Y <= scr_y + item_height) {