mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 14:30:54 +00:00
Adjust window position if screen widths are different
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35768 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cdf826a4d0
commit
71738e0dea
1 changed files with 9 additions and 0 deletions
|
@ -4773,6 +4773,7 @@ current key view.<br />
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sRect.size.height = value;
|
sRect.size.height = value;
|
||||||
|
|
||||||
#if defined(__MINGW__)
|
#if defined(__MINGW__)
|
||||||
// Finally, this is for handling possible frame errors due to MSWindows sending
|
// Finally, this is for handling possible frame errors due to MSWindows sending
|
||||||
// x/y frame position of -32000/32893 on a minimize. These are now ignored in the
|
// x/y frame position of -32000/32893 on a minimize. These are now ignored in the
|
||||||
|
@ -4844,6 +4845,14 @@ current key view.<br />
|
||||||
{
|
{
|
||||||
fRect.origin.x = nRect.origin.x + (fRect.origin.x - nRect.origin.x)
|
fRect.origin.x = nRect.origin.x + (fRect.origin.x - nRect.origin.x)
|
||||||
* (nRect.size.width / sRect.size.width);
|
* (nRect.size.width / sRect.size.width);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If width of the window goes beyond the screen width, then adjust the window over.
|
||||||
|
*/
|
||||||
|
if (NSMaxX(fRect) > nRect.size.width)
|
||||||
|
{
|
||||||
|
fRect.origin.x = (nRect.size.width - fRect.size.width);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (nRect.size.height != sRect.size.height)
|
if (nRect.size.height != sRect.size.height)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue