mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 14:50:38 +00:00
Fix to prevent restoring an NSWindowFrame to a completely off-screen location.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29747 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1fd690b848
commit
d5cc2fce52
1 changed files with 10 additions and 1 deletions
|
@ -4562,6 +4562,15 @@ current key view.<br />
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fRect.size.height = value;
|
fRect.size.height = value;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check that the window will come up on screen
|
||||||
|
*/
|
||||||
|
if (fRect.origin.x + fRect.size.width < 0)
|
||||||
|
{
|
||||||
|
NSLog(@"Bad screen frame - window is off screen");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scan in the frame for the area the window was placed in in screen.
|
* Scan in the frame for the area the window was placed in in screen.
|
||||||
|
@ -4599,7 +4608,7 @@ current key view.<br />
|
||||||
* the window could be placed (ie a rectangle excluding the dock).
|
* the window could be placed (ie a rectangle excluding the dock).
|
||||||
*/
|
*/
|
||||||
nRect = [[self screen] visibleFrame];
|
nRect = [[self screen] visibleFrame];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the new screen drawable area has moved relative to the one in
|
* If the new screen drawable area has moved relative to the one in
|
||||||
* which the window was saved, adjust the window position accordingly.
|
* which the window was saved, adjust the window position accordingly.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue