mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 07:21:02 +00:00
Merge pull request #23 from gnustep/randr
Fix for broken DnD on vertically aligned monitors
This commit is contained in:
commit
8f580a86f7
4 changed files with 15 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -78,6 +78,7 @@ typedef struct MonitorDevice {
|
|||
- (Display *) xDisplay;
|
||||
- (Window) xDisplayRootWindow;
|
||||
- (Window) xAppRootWindow;
|
||||
- (NSSize) xScreenSize;
|
||||
|
||||
- (void *) screenRContext;
|
||||
- (Visual *) screenVisual;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -540,6 +540,11 @@ _parse_display_name(NSString *name, int *dn, int *sn)
|
|||
return generic.appRootWindow;
|
||||
}
|
||||
|
||||
- (NSSize) xScreenSize
|
||||
{
|
||||
return xScreenSize;
|
||||
}
|
||||
|
||||
- (XGScreenContext *) _defaultScreenContext
|
||||
{
|
||||
XGScreenContext *screenCtxt;
|
||||
|
|
Loading…
Reference in a new issue