mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 03:10:38 +00:00
Small bug corrections.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18337 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a9e055f495
commit
d053e9a8ae
3 changed files with 20 additions and 211 deletions
|
@ -787,114 +787,7 @@ GSCurrentServer(void)
|
|||
[event_queue getObjects: events range: r];
|
||||
for (i = 0; i < end; i++)
|
||||
{
|
||||
BOOL matched = NO;
|
||||
|
||||
switch ([events[i] type])
|
||||
{
|
||||
case NSLeftMouseDown:
|
||||
if (mask & NSLeftMouseDownMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSLeftMouseUp:
|
||||
if (mask & NSLeftMouseUpMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSOtherMouseDown:
|
||||
if (mask & NSOtherMouseDownMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSOtherMouseUp:
|
||||
if (mask & NSOtherMouseUpMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSRightMouseDown:
|
||||
if (mask & NSRightMouseDownMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSRightMouseUp:
|
||||
if (mask & NSRightMouseUpMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSMouseMoved:
|
||||
if (mask & NSMouseMovedMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSMouseEntered:
|
||||
if (mask & NSMouseEnteredMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSMouseExited:
|
||||
if (mask & NSMouseExitedMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSLeftMouseDragged:
|
||||
if (mask & NSLeftMouseDraggedMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSOtherMouseDragged:
|
||||
if (mask & NSOtherMouseDraggedMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSRightMouseDragged:
|
||||
if (mask & NSRightMouseDraggedMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSKeyDown:
|
||||
if (mask & NSKeyDownMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSKeyUp:
|
||||
if (mask & NSKeyUpMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSFlagsChanged:
|
||||
if (mask & NSFlagsChangedMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSAppKitDefined:
|
||||
if (mask & NSAppKitDefinedMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSSystemDefined:
|
||||
if (mask & NSSystemDefinedMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSApplicationDefined:
|
||||
if (mask & NSApplicationDefinedMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSPeriodic:
|
||||
if (mask & NSPeriodicMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
case NSCursorUpdate:
|
||||
if (mask & NSCursorUpdateMask)
|
||||
matched = YES;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (matched)
|
||||
if (mask & NSEventMaskFromType([events[i] type]))
|
||||
{
|
||||
event = events[i];
|
||||
break;
|
||||
|
@ -957,106 +850,8 @@ GSCurrentServer(void)
|
|||
|
||||
if ([event timestamp] < when)
|
||||
{
|
||||
BOOL shouldRemove = NO;
|
||||
|
||||
if (mask == NSAnyEventMask)
|
||||
{
|
||||
shouldRemove = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch ([event type])
|
||||
{
|
||||
case NSLeftMouseDown:
|
||||
if (mask & NSLeftMouseDownMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSLeftMouseUp:
|
||||
if (mask & NSLeftMouseUpMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSOtherMouseDown:
|
||||
if (mask & NSOtherMouseDownMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSOtherMouseUp:
|
||||
if (mask & NSOtherMouseUpMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSRightMouseDown:
|
||||
if (mask & NSRightMouseDownMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSRightMouseUp:
|
||||
if (mask & NSRightMouseUpMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSMouseMoved:
|
||||
if (mask & NSMouseMovedMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSMouseEntered:
|
||||
if (mask & NSMouseEnteredMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSMouseExited:
|
||||
if (mask & NSMouseExitedMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSLeftMouseDragged:
|
||||
if (mask & NSLeftMouseDraggedMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSOtherMouseDragged:
|
||||
if (mask & NSOtherMouseDraggedMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSRightMouseDragged:
|
||||
if (mask & NSRightMouseDraggedMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSKeyDown:
|
||||
if (mask & NSKeyDownMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSKeyUp:
|
||||
if (mask & NSKeyUpMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSFlagsChanged:
|
||||
if (mask & NSFlagsChangedMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSPeriodic:
|
||||
if (mask & NSPeriodicMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
case NSCursorUpdate:
|
||||
if (mask & NSCursorUpdateMask)
|
||||
shouldRemove = YES;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (shouldRemove)
|
||||
if ((mask == NSAnyEventMask) ||
|
||||
(mask & NSEventMaskFromType([event type])))
|
||||
[event_queue removeObjectAtIndex: index];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue