summaryrefslogtreecommitdiff
path: root/src/Fl_Window_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-07-03 17:31:57 +0000
committerManolo Gouy <Manolo>2017-07-03 17:31:57 +0000
commit8dccfc88386561782d9b78900b283cedad2e59bb (patch)
treee241ec766008d154f32f1b3a313fd7233984606a /src/Fl_Window_Driver.cxx
parentba10af9edb594f69e58e6f2ccb251e3bdff3e9c6 (diff)
HiDPI support under WIN32 platform: completed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12285 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Window_Driver.cxx')
-rw-r--r--src/Fl_Window_Driver.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Fl_Window_Driver.cxx b/src/Fl_Window_Driver.cxx
index b750b1ff7..2ec0cfaff 100644
--- a/src/Fl_Window_Driver.cxx
+++ b/src/Fl_Window_Driver.cxx
@@ -260,6 +260,23 @@ int Fl_Window_Driver::screen_num() {
return Fl::screen_num(x(), y(), w(), h());
}
+void Fl_Window_Driver::resize_after_scale_change(int ns, float old_f, float new_f) {
+ int oldx = pWindow->x(), oldy = pWindow->y();
+ fl_uintptr_t current = current_cursor();
+ pWindow->hide();
+ screen_num(ns);
+ pWindow->position(oldx*old_f/new_f, oldy*old_f/new_f);
+ force_position(1);
+ if (pWindow->fullscreen_active()) {
+ pWindow->size(pWindow->w() * old_f/new_f, pWindow->h() * old_f/new_f);
+ }
+ Fl_Graphics_Driver::default_driver().scale(new_f);
+ pWindow->show();
+ reuse_cursor(current);
+ reuse_icons();
+//extern FILE*LOG;fprintf(LOG,"ns=%d old_f%.2f new_f=%.2f\n",ns,old_f,new_f);fflush(LOG);
+}
+
//
// End of "$Id$".
//