summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-03-09 16:27:27 +0000
committerManolo Gouy <Manolo>2018-03-09 16:27:27 +0000
commit7f78b1ef1468bb8242fb7fb37e3f27d0a8052ce1 (patch)
tree517c45c18c7dc28f8d3a05662a75497c408c1dbe /src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
parent12f628514771294102d2aa961373373a95ddab6b (diff)
Windows: remove necessity to compile with -DFLTK_HIDPI_SUPPORT to make WIN32 FLTK apps DPI-aware.
At this point, Windows FLTK apps detect HighDPI displays and rescale their GUI accordingly. They also all reply to ctrl/+/-/0/ keystrokes to enlarge/shrink/reset their windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
index 278fe740a..3492f9d6d 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
@@ -103,16 +103,10 @@ RECT // frame of the decorated window in screen coordinates
GetWindowRect(fl_xid(win), &r);
}
int width, height;
-#ifdef FLTK_HIDPI_SUPPORT
RECT rc;
GetClientRect(fl_xid(win), &rc);
width = rc.right;
height = rc.bottom;
-#else
- float scaling = ((Fl_WinAPI_Screen_Driver*)Fl::screen_driver())->DWM_scaling_factor();
- width = int(win->w() * scaling);
- height = int(win->h() * scaling);
-#endif
bx = (r.right - r.left - width)/2;
if (bx < 1) bx = 1;
by = bx;
@@ -137,14 +131,9 @@ int Fl_WinAPI_Window_Driver::decorated_h()
{
int bt, bx, by;
border_width_title_bar_height(bx, by, bt);
-#ifdef FLTK_HIDPI_SUPPORT
float s = Fl::screen_driver()->scale(screen_num());
int mini_by = by/s; if (mini_by < 1) mini_by = 1;
return h() + (bt + by)/s + mini_by;
-#else
- float scaling = ((Fl_WinAPI_Screen_Driver*)Fl::screen_driver())->DWM_scaling_factor();
- return h() + bt/scaling + 2 * by +1;
-#endif
}