Skip to content

Commit

Permalink
Windows: Have Fl::x(), Fl::y(), Fl::w() and Fl::h() change their valu…
Browse files Browse the repository at this point in the history
…es when the screen is rescaled.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13134 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Nov 26, 2018
1 parent d8c4447 commit db12060
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
Expand Up @@ -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;
}


Expand Down

0 comments on commit db12060

Please sign in to comment.