mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-22 12:22:16 +00:00
New mouselocation methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13530 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
309e040ca5
commit
6d269aec7d
8 changed files with 39 additions and 1194 deletions
|
@ -651,7 +651,7 @@ static NSNotificationCenter *nc = nil;
|
|||
NSGraphicsContext *context = GSCurrentContext();
|
||||
GSDisplayServer *srv = GSCurrentServer();
|
||||
|
||||
/* If we were deferred or one shot, out drag types may not have
|
||||
/* If we were deferred or one shot, our drag types may not have
|
||||
been registered properly in the backend. Remove them then re-add
|
||||
them when we create the window */
|
||||
dragTypes = [srv dragTypesForWindow: self];
|
||||
|
@ -663,8 +663,7 @@ static NSNotificationCenter *nc = nil;
|
|||
[srv removeDragTypes: dragTypes fromWindow: self];
|
||||
}
|
||||
|
||||
screenNumber = [[[_screen deviceDescription] objectForKey: @"NSScreenNumber"]
|
||||
intValue];
|
||||
screenNumber = [_screen screenNumber];
|
||||
_windowNum = [srv window: frame : _backingType : _styleMask : screenNumber];
|
||||
[srv setwindowlevel: [self level] : _windowNum];
|
||||
|
||||
|
@ -2404,10 +2403,13 @@ resetCursorRectsForView(NSView *theView)
|
|||
* loop status */
|
||||
- (NSPoint) mouseLocationOutsideOfEventStream
|
||||
{
|
||||
int screen;
|
||||
NSPoint p;
|
||||
|
||||
p = [GSCurrentServer() mouselocation];
|
||||
p = [self convertScreenToBase: p];
|
||||
screen = [_screen screenNumber];
|
||||
p = [GSServerForWindow(self) mouseLocationOnScreen: screen window: NULL];
|
||||
if (p.x != -1)
|
||||
p = [self convertScreenToBase: p];
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue