mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
* Source/NSWindow.m (applicationDidChangeScreenParameters:):
Call backend's `placewindow::` directly because our origin in OpenStep coordinates might left unchanged and `setFrame:display:` has check for it.
This commit is contained in:
parent
6d4afe9678
commit
96a3579e98
2 changed files with 24 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2020-03-05 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSWindow.m (applicationDidChangeScreenParameters:):
|
||||
Call backend's `placewindow::` directly because our origin in OpenStep
|
||||
coordinates might left unchanged and `setFrame:display:` has check
|
||||
for it.
|
||||
|
||||
2020-02-28 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSWindow.m (center): always center window on main screen -
|
||||
|
|
|
@ -2737,10 +2737,24 @@ titleWithRepresentedFilename(NSString *representedFilename)
|
|||
newFrame.origin.y += newScreenFrame.size.height - oldScreenFrame.size.height;
|
||||
// Screen X origin change. Screen width change shouldn't affect our frame.
|
||||
newFrame.origin.x += newScreenFrame.origin.x - oldScreenFrame.origin.x;
|
||||
[self setFrame: newFrame display: NO];
|
||||
if (_autosaveName != nil)
|
||||
|
||||
if (_windowNum)
|
||||
{
|
||||
[self saveFrameUsingName: _autosaveName];
|
||||
/* Call backend's `placewindow::` directly because our origin in OpenStep
|
||||
coordinates might left unchanged and `setFrame:display:` has check
|
||||
for it. */
|
||||
[GSServerForWindow(self) placewindow: newFrame : _windowNum];
|
||||
if (_autosaveName != nil)
|
||||
{
|
||||
[self saveFrameUsingName: _autosaveName];
|
||||
}
|
||||
[self display];
|
||||
}
|
||||
else
|
||||
{
|
||||
_frame = newFrame;
|
||||
newFrame.origin = NSZeroPoint;
|
||||
[_wv setFrame: newFrame];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue