mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
* Source/x11/XGServerWindow.m (screenList): call windowDepthForScreen:
with monitor index, not screen ID (screen_id field has already set to defScreen above). (windowDepthForScreen:): get Xlib screen with screen_id from monitor lit.
This commit is contained in:
parent
904739eb0c
commit
e3da99fb5e
1 changed files with 3 additions and 3 deletions
|
@ -4457,7 +4457,7 @@ _computeDepth(int class, int bpp)
|
|||
crtc_info = XRRGetCrtcInfo(dpy, screen_res, output_info->crtc);
|
||||
|
||||
// Fill the cache of device parameters
|
||||
monitors[i].depth = [self windowDepthForScreen: defScreen];
|
||||
monitors[i].depth = [self windowDepthForScreen: i];
|
||||
monitors[i].resolution = [self resolutionForScreen: defScreen];
|
||||
monitors[i].frame = NSMakeRect(crtc_info->x, crtc_info->y,
|
||||
crtc_info->width, crtc_info->height);
|
||||
|
@ -4489,7 +4489,7 @@ _computeDepth(int class, int bpp)
|
|||
return screens;
|
||||
}
|
||||
|
||||
// `screen` is a Xlib screen number.
|
||||
// `screen` is a monitor index not X11 screen
|
||||
- (NSWindowDepth) windowDepthForScreen: (int)screen
|
||||
{
|
||||
Screen *x_screen;
|
||||
|
@ -4500,7 +4500,7 @@ _computeDepth(int class, int bpp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
x_screen = XScreenOfDisplay(dpy, screen);
|
||||
x_screen = XScreenOfDisplay(dpy, monitors[screen].screen_id);
|
||||
|
||||
if (x_screen == NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue