summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-07-30 16:21:57 +0000
committerManolo Gouy <Manolo>2017-07-30 16:21:57 +0000
commitc4e04e4c7f446464ef65382cf10bc13417563b3b (patch)
treef012307f02f8fba85f406f533908f63f7b15ea1c /src/drivers/WinAPI
parent5a7a954ebd1005b30bbe48d84e4291c66ad30252 (diff)
Improve rescaling when window moved across screens: make sure center stays on new screen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12367 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/WinAPI')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index 0f0609bcc..1b9b03f17 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -666,9 +666,10 @@ void Fl_WinAPI_Screen_Driver::offscreen_size(Fl_Offscreen off, int &width, int &
}
}
+//NOTICE: returns -1 if x,y is not in any screen
int Fl_WinAPI_Screen_Driver::screen_num_unscaled(int x, int y)
{
- int screen = 0;
+ int screen = -1;
if (num_screens < 0) init();
for (int i = 0; i < num_screens; i ++) {
if (x >= screens[i].left && x < screens[i].right &&