summaryrefslogtreecommitdiff
path: root/src/Fl_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-06-28 13:33:53 +0000
committerManolo Gouy <Manolo>2017-06-28 13:33:53 +0000
commit322b62a9f126987914193dedbc892b8e5c17f453 (patch)
tree2fefd2fb327f9caaed1f1d7798818767598db136 /src/Fl_Screen_Driver.cxx
parent9041a3dc70aa376896f992c43ec1a6d63a9a8d1a (diff)
HiDPI support: keep window's cursor after rescaling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12275 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Screen_Driver.cxx')
-rw-r--r--src/Fl_Screen_Driver.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx
index 54581c551..811dd1c34 100644
--- a/src/Fl_Screen_Driver.cxx
+++ b/src/Fl_Screen_Driver.cxx
@@ -365,6 +365,7 @@ void Fl_Screen_Driver::rescale_all_windows_from_screen(int screen, float f)
for (i = count - 1; i >= 0; i--) { // rescale all top-level windows, finishing with front one
win = win_array[i];
int oldx = win->x(), oldy = win->y();
+ fl_uintptr_t current = win->driver()->current_cursor();
win->hide();
win->driver()->screen_num(screen);
win->position(oldx*old_f/f, oldy*old_f/f);
@@ -373,6 +374,7 @@ void Fl_Screen_Driver::rescale_all_windows_from_screen(int screen, float f)
win->size(win->w() * old_f/f, win->h() * old_f/f);
}
win->show();
+ win->driver()->reuse_cursor(current);
win->wait_for_expose();
}
delete[] win_array;