Check for window iff not printing.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15279 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-12-10 17:52:50 +00:00
parent 02bf520b01
commit 84c74e4a2d
2 changed files with 27 additions and 14 deletions

View file

@ -1,3 +1,11 @@
2002-12-10 Adam Fedor <fedor@gnu.org>
* Source/NSView.m ([NSView -lockFocusInRect:]): Check for window iff
not printing.
([NSView -unlockFocusNeedsFlush:]): Idem.
([NSView -displayIfNeededInRectIgnoringOpacity:]): Idem.
([NSView -displayRectIgnoringOpacity:]): Idem.
2002-12-10 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSImageView.m

View file

@ -1542,24 +1542,28 @@ GSSetDragTypes(NSView* obj, NSArray *types)
- (void) lockFocusInRect: (NSRect)rect
{
NSGraphicsContext *ctxt = GSCurrentContext();
struct NSWindow_struct *window_t;
NSRect wrect;
int window_gstate;
NSAssert(_window != nil, NSInternalInconsistencyException);
/* Check for deferred window */
if ((window_gstate = [_window gState]) == 0)
if (viewIsPrinting == nil)
{
return;
NSAssert(_window != nil, NSInternalInconsistencyException);
/* Check for deferred window */
if ((window_gstate = [_window gState]) == 0)
{
return;
}
}
[ctxt lockFocusView: self inRect: rect];
wrect = [self convertRect: rect toView: nil];
NSDebugLLog(@"NSView", @"Displaying rect \n\t%@\n\t window %p, flip %d",
NSStringFromRect(wrect), _window, _rFlags.flipped_view);
window_t = (struct NSWindow_struct *)_window;
if (viewIsPrinting == nil)
[window_t->_rectsBeingDrawn addObject: [NSValue valueWithRect: wrect]];
{
struct NSWindow_struct *window_t = (struct NSWindow_struct *)_window;
[window_t->_rectsBeingDrawn addObject: [NSValue valueWithRect: wrect]];
}
/* Make sure we don't modify superview's gstate */
DPSgsave(ctxt);
@ -1632,16 +1636,17 @@ GSSetDragTypes(NSView* obj, NSArray *types)
{
NSGraphicsContext *ctxt = GSCurrentContext();
NSAssert(_window != nil, NSInternalInconsistencyException);
/* Check for deferred window */
if ([_window gState] == 0)
return;
if (viewIsPrinting == nil)
{
NSAssert(_window != nil, NSInternalInconsistencyException);
/* Check for deferred window */
if ([_window gState] == 0)
return;
/* Restore our original gstate */
DPSgrestore(ctxt);
}
/* Restore state of nesting lockFocus */
DPSgrestore(ctxt);
if (!_allocate_gstate)
@ -1813,7 +1818,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
- (void) displayIfNeededInRectIgnoringOpacity: (NSRect)aRect
{
if (_window == nil)
if (viewIsPrinting == nil && _window == nil)
{
return;
}
@ -1943,7 +1948,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
BOOL subviewNeedsDisplay = NO;
NSRect neededRect;
if (_window == nil)
if (viewIsPrinting == nil && _window == nil)
{
return;
}