* Source/x11/XGServerWindow.m (screeList): remove usage of intermediate frame variable.

This commit is contained in:
Sergii Stoian 2020-02-11 23:56:39 +02:00
parent 2fdced823c
commit 230006323d

View file

@ -4465,6 +4465,7 @@ _computeDepth(int class, int bpp)
NSMutableArray *tmpScreens;
int i;
int mi;
int xScreenHeight = DisplayHeight(dpy, defScreen);
monitorsCount = screen_res->noutput;
tmpScreens = [NSMutableArray arrayWithCapacity: monitorsCount];
@ -4487,11 +4488,10 @@ _computeDepth(int class, int bpp)
monitors[mi].resolution = [self resolutionForScreen: defScreen];
/* Transform coordinates from Xlib (flipped) to OpenStep (unflippped).
Windows and screens should have the same coordinate system. */
frame = NSMakeRect(crtc_info->x,
xScreenHeight - crtc_info->height - crtc_info->y,
crtc_info->width,
crtc_info->height);
monitors[mi].frame = frame;
monitors[mi].frame = NSMakeRect(crtc_info->x,
xScreenHeight - crtc_info->height - crtc_info->y,
crtc_info->width,
crtc_info->height);
/* Add monitor ID (index in monitors array).
Put primary monitor ID at index 0 since NSScreen get this as main
screen if application has no key window. */