mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
TG: Implement setMouseLocation:onScreen
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28898 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c0abc9a675
commit
1f84a6a21f
2 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-10-25 Thomas Gamper <icicle@cg.tuwien.ac.at>
|
||||
|
||||
* Source/x11/XGServerWindow.m
|
||||
Implement setMouseLocation:onScreen:.
|
||||
|
||||
2009-10-25 Thomas Gamper <icicle@cg.tuwien.ac.at>
|
||||
|
||||
* Source/x11/XGGLContext.m
|
||||
|
|
|
@ -3653,6 +3653,19 @@ static BOOL didCreatePixmaps;
|
|||
grab_window = NULL;
|
||||
}
|
||||
|
||||
- (void) setMouseLocation: (NSPoint)mouseLocation onScreen: (int)aScreen
|
||||
{
|
||||
int height;
|
||||
int destX, destY;
|
||||
|
||||
height = DisplayHeight(dpy, aScreen);
|
||||
destY = height - mouseLocation.y;
|
||||
destX = mouseLocation.x;
|
||||
|
||||
XWarpPointer(dpy, None, [self xDisplayRootWindowForScreen: aScreen],
|
||||
0, 0, 0, 0, destX, destY);
|
||||
}
|
||||
|
||||
- (void) setinputfocus: (int)win
|
||||
{
|
||||
gswindow_device_t *window = WINDOW_WITH_TAG(win);
|
||||
|
|
Loading…
Reference in a new issue