* 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:
Sergii Stoian 2020-03-05 02:21:26 +02:00
parent 6d4afe9678
commit 96a3579e98
2 changed files with 24 additions and 3 deletions

View file

@ -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 -

View file

@ -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];
}
}