mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Merge pull request #21 from gnustep/randr
Align screens origin to OpenStep coordinate system.
This commit is contained in:
commit
6923a62820
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2020-02-11 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/x11/XGServerWindow.m (screenList): Transform screen
|
||||
origin into unflipped (OpenStep) coordinate system for XRandR capable
|
||||
systems. After this change windows and screen will use the same start
|
||||
of coordinate system for their origins.
|
||||
|
||||
2020-02-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/xlib/GSXftFontInfo.m,
|
||||
|
|
|
@ -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];
|
||||
|
@ -4485,8 +4486,12 @@ _computeDepth(int class, int bpp)
|
|||
monitors[mi].screen_id = defScreen;
|
||||
monitors[mi].depth = [self windowDepthForScreen: mi];
|
||||
monitors[mi].resolution = [self resolutionForScreen: defScreen];
|
||||
monitors[mi].frame = NSMakeRect(crtc_info->x, crtc_info->y,
|
||||
crtc_info->width, crtc_info->height);
|
||||
/* Transform coordinates from Xlib (flipped) to OpenStep (unflippped).
|
||||
Windows and screens should have the same coordinate system. */
|
||||
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. */
|
||||
|
|
Loading…
Reference in a new issue