Numerous WIN32 and bug fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2380 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
netcrep 1997-08-16 23:47:24 +00:00
parent 72921c6e77
commit 74265dc7fb
17 changed files with 213 additions and 132 deletions

View file

@ -349,6 +349,8 @@ static int mouseDownFlags = 0;
{
int i, j;
[super initWithFrame: frameRect];
ASSIGN(cellPrototype, prototype);
cells = [[NSMutableArray alloc] initWithCapacity:rows];
@ -1164,6 +1166,10 @@ static int mouseDownFlags = 0;
if (mode != NSTrackModeMatrix)
[NSEvent startPeriodicEventsAfterDelay:0.05 withPeriod:0.05];
ASSIGN(lastEvent, theEvent);
// capture mouse
[[self window] captureMouse: self];
[self lockFocus];
while (!done) {
@ -1286,12 +1292,14 @@ static int mouseDownFlags = 0;
/* Get the next event */
while (!shouldProceedEvent) {
theEvent = [NSApp nextEventMatchingMask:eventMask
untilDate:[NSDate distantFuture]
inMode:NSEventTrackingRunLoopMode
dequeue:YES];
theEvent = [[NSApplication sharedApplication]
nextEventMatchingMask:eventMask
untilDate:[NSDate distantFuture]
inMode:NSEventTrackingRunLoopMode
dequeue:YES];
switch ([theEvent type]) {
case NSPeriodic:
NSDebugLog(@"NSMatrix: got NSPeriodic event\n");
shouldProceedEvent = YES;
break;
case NSLeftMouseUp:
@ -1300,6 +1308,7 @@ static int mouseDownFlags = 0;
ASSIGN(lastEvent, theEvent);
break;
default:
NSDebugLog(@"NSMatrix: got event type: %d\n", [theEvent type]);
ASSIGN(lastEvent, theEvent);
continue;
}
@ -1308,6 +1317,9 @@ static int mouseDownFlags = 0;
lastLocation = [self convertPoint:lastLocation fromView:nil];
}
// Release mouse
[[self window] releaseMouse: self];
/* Finalize the selection */
switch (mode) {
case NSTrackModeMatrix: