summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-07-27 08:30:20 +0000
committerManolo Gouy <Manolo>2017-07-27 08:30:20 +0000
commit813bc06b195138e24a16f3163f02e4d5feb6fcc6 (patch)
tree6f20d1d3e07814d86865c194c40ce55afed17819 /src
parent6b24b209669f2a5d20ad862676f66617507a752d (diff)
Fix window iconize/deiconize when multiple screens with distinct scaling factors.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12357 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_win32.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index a7827d6e3..e8749a4cd 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1116,7 +1116,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
//fl_msg.lPrivate = ???
Fl_Window *window = fl_find(hWnd);
- float scale = Fl_Graphics_Driver::default_driver().scale();
+ float scale = window ? Fl::screen_driver()->scale(window->driver()->screen_num()) : Fl_Graphics_Driver::default_driver().scale();
if (window) switch (uMsg) {
@@ -1454,6 +1454,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
resize_bug_fix = window;
int nx = LOWORD(lParam);
int ny = HIWORD(lParam);
+ bool iconized = (nx >= 0x8000 && ny >= 0x8000);
+ if (iconized) {
+ break;
+ }
if (nx & 0x8000) nx -= 65536;
if (ny & 0x8000) ny -= 65536;
//fprintf(LOG,"WM_MOVE position(%d,%d) s=%.2f\n",int(nx/scale),int(ny/scale),scale);