* Source/NSWindow.m (sendEvent:): removed usage of extra local variables

in GSAppKitWindowMoved code block.
This commit is contained in:
Sergii Stoian 2020-02-26 02:05:34 +02:00
parent b3e099f4ab
commit f460e3f875
2 changed files with 8 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2020-02-26 Sergii Stoian <stoyan255@gmail.com>
* Source/NSWindow.m (sendEvent:): removed usage of extra local variables
in GSAppKitWindowMoved code block.
2020-02-23 Sergii Stoian <stoyan255@gmail.com>
* Source/NSWindow.m

View file

@ -4175,12 +4175,10 @@ checkCursorRectanglesExited(NSView *theView, NSEvent *theEvent, NSPoint lastPoi
{
case GSAppKitWindowMoved:
{
NSScreen *oldScreen;
NSScreen *newScreen;
oldScreen = _screen;
NSScreen *oldScreen = _screen;
_frame.origin.x = (CGFloat)[theEvent data1];
_frame.origin.y = (CGFloat)[theEvent data2];
newScreen = [self screen];
NSDebugLLog(@"Moving", @"Move event: %d %@",
(int)_windowNum, NSStringFromPoint(_frame.origin));
if (_autosaveName != nil)
@ -4189,7 +4187,7 @@ checkCursorRectanglesExited(NSView *theView, NSEvent *theEvent, NSPoint lastPoi
}
[nc postNotificationName: NSWindowDidMoveNotification
object: self];
if (newScreen != oldScreen)
if ([self screen] != oldScreen)
{
[nc postNotificationName: NSWindowDidChangeScreenNotification
object: self];