diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-11-29 09:48:23 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-11-29 09:48:23 +0100 |
| commit | ff372c86d8ef225ce87d1ff5539f2000e1849250 (patch) | |
| tree | 73e33e3692204d83a2839b2b554c46e62ab5800e /src/drivers | |
| parent | f5f90432084cd7386764ef40b5d9d98a026c0665 (diff) | |
Fix for issue #123 - Windows platform
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H | 1 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H index 2964375f1..9bd8485a3 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H @@ -54,6 +54,7 @@ public: virtual int w(); virtual int h(); virtual void screen_xywh(int &X, int &Y, int &W, int &H, int n); + void screen_xywh_unscaled(int &X, int &Y, int &W, int &H, int n); virtual void screen_dpi(float &h, float &v, int n=0); int screen_num_unscaled(int x, int y); virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n); diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx index 440bf2762..659113c3c 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx @@ -175,6 +175,16 @@ void Fl_WinAPI_Screen_Driver::screen_xywh(int &X, int &Y, int &W, int &H, int n) } +void Fl_WinAPI_Screen_Driver::screen_xywh_unscaled(int &X, int &Y, int &W, int &H, int n) { + if (num_screens < 0) init(); + if ((n < 0) || (n >= num_screens)) n = 0; + X = screens[n].left; + Y = screens[n].top; + W = screens[n].right - screens[n].left; + H = screens[n].bottom - screens[n].top; +}; + + void Fl_WinAPI_Screen_Driver::screen_dpi(float &h, float &v, int n) { if (num_screens < 0) init(); |
