summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-11-26 20:55:23 +0000
committerManolo Gouy <Manolo>2018-11-26 20:55:23 +0000
commitdb1206065adcb4d681e24843c9b21e89a1bb0a50 (patch)
tree9bcf4233d17089b42ae52d46287db100ec207ae0 /src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
parentd8c4447c8429328711f292dfee95703122c3ea33 (diff)
Windows: Have Fl::x(), Fl::y(), Fl::w() and Fl::h() change their values when the screen is rescaled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13134 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index d93a2df6d..1dcc53721 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -209,37 +209,49 @@ void Fl_WinAPI_Screen_Driver::screen_dpi(float &h, float &v, int n)
int Fl_WinAPI_Screen_Driver::x()
{
- RECT r;
+ /*RECT r;
SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
- return r.left;
+ return r.left;*/
+ int X, Y, W, H;
+ screen_work_area(X, Y, W, H, 0);
+ return X;
}
int Fl_WinAPI_Screen_Driver::y()
{
- RECT r;
+ /*RECT r;
SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
- return r.top;
+ return r.top;*/
+ int X, Y, W, H;
+ screen_work_area(X, Y, W, H, 0);
+ return Y;
}
int Fl_WinAPI_Screen_Driver::h()
{
- RECT r;
+ /*RECT r;
SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
- return r.bottom - r.top;
+ return r.bottom - r.top;*/
+ int X, Y, W, H;
+ screen_work_area(X, Y, W, H, 0);
+ return H;
}
int Fl_WinAPI_Screen_Driver::w()
{
- RECT r;
+ /*RECT r;
SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
- return r.right - r.left;
+ return r.right - r.left;*/
+ int X, Y, W, H;
+ screen_work_area(X, Y, W, H, 0);
+ return W;
}