FLTK logo

[master] 7fdac37 - Windows: fix scaling problem in Fl_Tile.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 7fdac37 - Windows: fix scaling problem in Fl_Tile. "ManoloFLTK" Jan 24, 2021  
 
commit 7fdac3790a487f0694a1799f5df8bbae6803bb0a
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Jan 25 08:01:28 2021 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Jan 25 08:01:42 2021 +0100

    Windows: fix scaling problem in Fl_Tile.
    
    The problem was visible with test/tile for fractional scaling values when
    moving the vertical division.

 src/Fl_win32.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git src/Fl_win32.cxx src/Fl_win32.cxx
index 555abd1..bd37ddd 100644
--- src/Fl_win32.cxx
+++ src/Fl_win32.cxx
@@ -1608,7 +1608,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
           else if (!Fl_WinAPI_Window_Driver::data_for_resize_window_between_screens_.busy)
             wd->screen_num(news);
         }
-        window->position(nx / scale, ny / scale);
+        window->position(round(nx/scale), round(ny/scale));
         break;
       } // case WM_MOVE
 
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.