* Source/x11/XGServerWindow.m (_XFrameToOSFrame:for:): use Xlib

screen height instead of monitor's because we convert coordinates
  from Xlib area.
  (movewindow::): use Xlib screen height because we're operating in
  Xlib coordinate system.
  (screenList): fill monitor depth with value returned by
  windowPathForScreen with monitor at index 0 (screen_id already set so
  method will get correct screen_id).

* Source/x11/XGServerEvent.m (processEvent:): fixed indentaion.
This commit is contained in:
Sergii Stoian 2020-02-07 19:00:27 +02:00
parent bcf71f2302
commit e6108e05f7
3 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,16 @@
2020-02-07 Sergii Stoian <stoyan255@gmail.com>
* Source/x11/XGServerWindow.m (_XFrameToOSFrame:for:): use Xlib
screen height instead of monitor's because we convert coordinates
from Xlib area.
(movewindow::): use Xlib screen height because we're operating in
Xlib coordinate system.
(screenList): fill monitor depth with value returned by
windowPathForScreen with monitor at index 0 (screen_id already set so
method will get correct screen_id).
* Source/x11/XGServerEvent.m (processEvent:): fixed indentaion.
2020-02-07 Fred Kiefer <FredKiefer@gmx.de>
* Source/x11/XGServerWindow.m (swapColors): Made code more

View file

@ -1047,7 +1047,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
* this event, causing a confusion.
*/
window = [NSApp windowWithWindowNumber: cWin->number];
[window sendEvent: r];
[window sendEvent: r];
/* Update monitor_id of the backend window.
NSWindow may change screen pointer while processing
the event. */

View file

@ -576,7 +576,7 @@ BOOL AtomPresentAndPointsToItself(Display *dpy, Atom atom, Atom type)
[self styleoffsets: &l : &r : &t : &b : style : win->ident];
o = x;
o.origin.y = [self boundsForScreen: win->monitor_id].size.height - x.origin.y;
o.origin.y = DisplayHeight(dpy, defScreen) - x.origin.y;
o.origin.y = o.origin.y - x.size.height - b;
o.origin.x -= l;
o.size.width += l + r;
@ -3192,7 +3192,7 @@ swapColors(unsigned char *image_data, NSBitmapImageRep *rep)
}
window->siz_hints.x = (int)loc.x;
window->siz_hints.y = (int)([self boundsForScreen: window->monitor_id].size.height -
window->siz_hints.y = (int)(DisplayHeight(dpy, defScreen) -
loc.y - window->siz_hints.height);
XMoveWindow (dpy, window->ident, window->siz_hints.x, window->siz_hints.y);
setNormalHints(dpy, window);
@ -4512,7 +4512,7 @@ _computeDepth(int class, int bpp)
monitorsCount = 1;
monitors = NSZoneMalloc([self zone], sizeof(MonitorDevice));
monitors[0].screen_id = defScreen;
monitors[0].depth = [self windowDepthForScreen: defScreen];
monitors[0].depth = [self windowDepthForScreen: 0];
monitors[0].resolution = [self resolutionForScreen: defScreen];
monitors[0].frame = NSMakeRect(0, 0,
DisplayWidth(dpy, defScreen),