* Source/x11/XGServerWindow.m (placewindow::): move NSWindow fetching

code closer to its usage.
This commit is contained in:
Sergii Stoian 2020-02-24 23:53:57 +02:00
parent f080ecdf78
commit 70e4222ece

View file

@ -3234,7 +3234,6 @@ swapColors(unsigned char *image_data, NSBitmapImageRep *rep)
NSDebugLLog(@"XGTrace", @"DPSplacewindow: %@ : %d", NSStringFromRect(rect), NSDebugLLog(@"XGTrace", @"DPSplacewindow: %@ : %d", NSStringFromRect(rect),
win); win);
nswin = GSWindowWithNumber(win);
frame = [self _XFrameToOSFrame: window->xframe for: window]; frame = [self _XFrameToOSFrame: window->xframe for: window];
if (NSEqualRects(rect, frame) == YES) if (NSEqualRects(rect, frame) == YES)
return; return;
@ -3285,6 +3284,7 @@ swapColors(unsigned char *image_data, NSBitmapImageRep *rep)
with min/max sizes and resizability in some window managers. */ with min/max sizes and resizability in some window managers. */
setNormalHints(dpy, window); setNormalHints(dpy, window);
nswin = GSWindowWithNumber(win);
if (resize == YES) if (resize == YES)
{ {
NSDebugLLog(@"Moving", @"Fake size %lu - %@", window->number, NSDebugLLog(@"Moving", @"Fake size %lu - %@", window->number,