* Headers/Additions/GNUstepGUI/GSDisplayServer.h

* Source/GSDisplayServer.m: Add new method -_printEventQueue.
* Source/NSWindow.m (-_checkCursorRectangles:forEvent:): Replace
  hack with proper functions that handle cursor rectangles.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37026 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2013-08-30 11:27:10 +00:00
parent aa9d40fcfd
commit 9ad339a73a
4 changed files with 217 additions and 107 deletions

View file

@ -331,7 +331,7 @@ GSCurrentServer(void)
NSCountedSet *old = (NSCountedSet*)NSMapGet(drag_types, (void*)win);
NSEnumerator *drag_enum = [types objectEnumerator];
id type;
unsigned originalCount;
NSUInteger originalCount;
/*
* Make sure the set exists.
@ -970,14 +970,14 @@ GSCurrentServer(void)
inMode: (NSString*)mode
dequeue: (BOOL)flag
{
unsigned pos = 0; /* Position in queue scanned so far */
NSRunLoop *loop = nil;
NSUInteger pos = 0; /* Position in queue scanned so far */
NSRunLoop *loop = nil;
do
{
unsigned count = [event_queue count];
NSEvent *event;
unsigned i = 0;
NSUInteger count = [event_queue count];
NSEvent *event;
NSUInteger i = 0;
if (count == 0)
{
@ -999,7 +999,7 @@ GSCurrentServer(void)
*/
if (count > pos)
{
unsigned end = count - pos;
NSUInteger end = count - pos;
NSRange r = NSMakeRange(pos, end);
NSEvent *events[end];
@ -1055,7 +1055,7 @@ GSCurrentServer(void)
- (void) discardEventsMatchingMask: (unsigned)mask
beforeEvent: (NSEvent*)limit
{
unsigned index = [event_queue count];
NSUInteger index = [event_queue count];
/*
* If there is a range to use - remove all the matching events in it
@ -1063,14 +1063,14 @@ GSCurrentServer(void)
*/
if (index > 0)
{
NSTimeInterval when = [limit timestamp];
NSEvent *events[index];
NSTimeInterval when = [limit timestamp];
NSEvent *events[index];
[event_queue getObjects: events];
while (index-- > 0)
{
NSEvent *event = events[index];
NSEvent *event = events[index];
if ([event timestamp] < when)
{
@ -1096,4 +1096,29 @@ GSCurrentServer(void)
[event_queue addObject: anEvent];
}
- (void) _printEventQueue
{
NSUInteger index = [event_queue count];
if (index > 0)
{
NSEvent *events[index];
NSUInteger i;
NSLog(@"Dumping events from queue");
[event_queue getObjects: events];
for (i = 0; i < index; i++)
{
NSEvent *event = events[i];
NSLog(@"index %d %@", i, event);
}
}
else
{
NSLog(@"Event queue is empty");
}
}
@end