Correction for bug#21478

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@25552 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2007-11-05 06:58:00 +00:00
parent f6dc7bc66a
commit 079e761dc5
2 changed files with 17 additions and 124 deletions

View file

@ -1,3 +1,8 @@
2007-11-05 01:56-EST Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormViewEditor.m: Change code to use drawRect: instead
of drawInNeededIgnoringOpacity: to correct bug#21478.
2007-09-07 19:57-EDT Gregory John Casamento <greg_casamento@yahoo.com> 2007-09-07 19:57-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Palettes/0Menus/GormNSMenu.m: Correct exception on start when * Palettes/0Menus/GormNSMenu.m: Correct exception on start when

View file

@ -122,8 +122,6 @@
static BOOL currently_displaying = NO; static BOOL currently_displaying = NO;
@implementation GormViewEditor @implementation GormViewEditor
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
@ -1419,13 +1417,16 @@ static BOOL currently_displaying = NO;
withObject: self]; withObject: self];
} }
/*
- (void) displayIfNeededInRectIgnoringOpacity: (NSRect) rect - (void) displayIfNeededInRectIgnoringOpacity: (NSRect) rect
inContext: (NSGraphicsConext *)gc
{ {
if (currently_displaying == NO) if (currently_displaying == NO)
{ {
[[self window] disableFlushWindow]; [[self window] disableFlushWindow];
currently_displaying = YES; currently_displaying = YES;
[super displayIfNeededInRectIgnoringOpacity: rect]; [super displayIfNeededInRectIgnoringOpacity: rect
inContext: gc];
[self lockFocus]; [self lockFocus];
[self postDraw: rect]; [self postDraw: rect];
[self unlockFocus]; [self unlockFocus];
@ -1435,20 +1436,22 @@ static BOOL currently_displaying = NO;
} }
else else
{ {
[super displayIfNeededInRectIgnoringOpacity: rect]; [super displayIfNeededInRectIgnoringOpacity: rect
inContext: gc];
[self lockFocus]; [self lockFocus];
[self postDraw: rect]; [self postDraw: rect];
[self unlockFocus]; [self unlockFocus];
} }
} }
*/
- (void) displayRectIgnoringOpacity: (NSRect) rect - (void) drawRect: (NSRect) rect
{ {
if (currently_displaying == NO) if (currently_displaying == NO)
{ {
[[self window] disableFlushWindow]; [[self window] disableFlushWindow];
currently_displaying = YES; currently_displaying = YES;
[super displayRectIgnoringOpacity: rect]; [super drawRect: rect];
[self lockFocus]; [self lockFocus];
[self postDraw: rect]; [self postDraw: rect];
[self unlockFocus]; [self unlockFocus];
@ -1458,7 +1461,7 @@ static BOOL currently_displaying = NO;
} }
else else
{ {
[super displayRectIgnoringOpacity: rect]; [super drawRect: rect];
[self lockFocus]; [self lockFocus];
[self postDraw: rect]; [self postDraw: rect];
[self unlockFocus]; [self unlockFocus];
@ -1538,121 +1541,6 @@ static BOOL currently_displaying = NO;
@implementation GormViewEditor (ResponderAdditions) @implementation GormViewEditor (ResponderAdditions)
- (void) keyDown: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder keyDown: theEvent];
else
return [self noResponderFor: @selector(keyDown:)];
}
- (void) keyUp: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder keyUp: theEvent];
else
return [self noResponderFor: @selector(keyUp:)];
}
- (void) otherMouseDown: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder otherMouseDown: theEvent];
else
return [self noResponderFor: @selector(otherMouseDown:)];
}
- (void) otherMouseDragged: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder otherMouseDragged: theEvent];
else
return [self noResponderFor: @selector(otherMouseDragged:)];
}
- (void) otherMouseUp: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder otherMouseUp: theEvent];
else
return [self noResponderFor: @selector(otherMouseUp:)];
}
- (void) mouseDragged: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder mouseDragged: theEvent];
else
return [self noResponderFor: @selector(mouseDragged:)];
}
- (void) mouseEntered: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder mouseEntered: theEvent];
else
return [self noResponderFor: @selector(mouseEntered:)];
}
- (void) mouseExited: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder mouseExited: theEvent];
else
return [self noResponderFor: @selector(mouseExited:)];
}
- (void) mouseMoved: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder mouseMoved: theEvent];
else
return [self noResponderFor: @selector(mouseMoved:)];
}
- (void) mouseUp: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder mouseUp: theEvent];
else
return [self noResponderFor: @selector(mouseUp:)];
}
- (void) rightMouseDown: (NSEvent*)theEvent
{
if (_next_responder != nil)
return [_next_responder rightMouseDown: theEvent];
else
return [self noResponderFor: @selector(rightMouseDown:)];
}
- (void) rightMouseDragged: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder rightMouseDragged: theEvent];
else
return [self noResponderFor: @selector(rightMouseDragged:)];
}
- (void) rightMouseUp: (NSEvent*)theEvent
{
if (_next_responder)
return [_next_responder rightMouseUp: theEvent];
else
return [self noResponderFor: @selector(rightMouseUp:)];
}
- (void) scrollWheel: (NSEvent *)theEvent
{
if (_next_responder)
return [_next_responder scrollWheel: theEvent];
else
return [self noResponderFor: @selector(scrollWheel:)];
}
- (BOOL) acceptsFirstMouse: (NSEvent*)theEvent - (BOOL) acceptsFirstMouse: (NSEvent*)theEvent
{ {
return YES; return YES;