From 3baa44c8e8b0daa02d950ba7160a06bd6bce2952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Tue, 17 Sep 2024 14:00:03 -0300 Subject: [PATCH] Added comments. --- src/docs/HISTORY.md | 1 + src/lib/mrvGL/mrvTimelineViewport.cpp | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/docs/HISTORY.md b/src/docs/HISTORY.md index 991146748..022fe29aa 100644 --- a/src/docs/HISTORY.md +++ b/src/docs/HISTORY.md @@ -27,6 +27,7 @@ v1.2.8 - Fixed Save Resolution setting being set to Half Size when Save Annotations was on. - Made Status Bar error/warnings remain longer (8 seconds instead of 5). +- Fixed a precision issue on Windows with arbitrary scalings like 115%. v1.2.7 diff --git a/src/lib/mrvGL/mrvTimelineViewport.cpp b/src/lib/mrvGL/mrvTimelineViewport.cpp index fc6ca3bdf..368691214 100644 --- a/src/lib/mrvGL/mrvTimelineViewport.cpp +++ b/src/lib/mrvGL/mrvTimelineViewport.cpp @@ -2278,21 +2278,31 @@ namespace mrv w->fullscreen(); view->take_focus(); + int PW = pixel_w(); + int PH = pixel_h(); + if (!secondary) { - // Fullscreen does not update immediately, so we need - // to force a resize. + // Fullscreen does not update immediately on Linux, so we + // need to force a resize. On macOS, I am not sure, but + // we'll also leave it. + // On Windows, we should not call screen_xywh as it may + // be wrong for scaling factors like 115%. +#ifndef _WIN32 int X, Y, W, H; int screen_num = w->screen_num(); Fl::screen_xywh(X, Y, W, H, screen_num); w->resize(X, Y, W, H); - +#endif + // When fullscreen happens, the tool group bar also resizes // on width, so we need to bring it back to its originazl // size. p.ui->uiRegion->layout(); + p.ui->uiViewGroup->layout(); p.ui->uiViewGroup->redraw(); + } } }