Merge pull request #23 from gnustep/randr

Fix for broken DnD on vertically aligned monitors
This commit is contained in:
Sergii Stoian 2020-03-03 12:08:54 +02:00 committed by GitHub
commit 8f580a86f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2020-03-03 Sergii Stoian <stoyan255@gmail.com>
* Headers/x11/XGServer.h,
* Source/x11/XGServer.m (xScreenSize): new primitive method.
* Source/x11/XGDragView.m (XY): use new primitive method to get Xlib
screen height. Fixes broken DnD on vertically aligned monitors.
2020-03-01 Sergii Stoian <stoyan255@gmail.com>
* Source/x11/XGServerWindow.m (placewindow::): call XMoveResizeWindow

View file

@ -78,6 +78,7 @@ typedef struct MonitorDevice {
- (Display *) xDisplay;
- (Window) xDisplayRootWindow;
- (Window) xAppRootWindow;
- (NSSize) xScreenSize;
- (void *) screenRContext;
- (Visual *) screenVisual;

View file

@ -54,7 +54,7 @@
#define DRAGWINDEV [XGServer _windowWithTag: [_window windowNumber]]
#define XX(P) (P.x)
#define XY(P) ([GSCurrentServer() boundsForScreen: DRAGWINDEV->monitor_id].size.height - P.y)
#define XY(P) ([(XGServer *)GSCurrentServer() xScreenSize].height - P.y)
@interface XGRawWindow : NSWindow
@end

View file

@ -540,6 +540,11 @@ _parse_display_name(NSString *name, int *dn, int *sn)
return generic.appRootWindow;
}
- (NSSize) xScreenSize
{
return xScreenSize;
}
- (XGScreenContext *) _defaultScreenContext
{
XGScreenContext *screenCtxt;