mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:50:48 +00:00
Minor bugfixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3737 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2d4a996dd2
commit
2199bd736c
3 changed files with 37 additions and 23 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Feb 17 11:50:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
|
* Source/NSView.m: Tidyup - visibleRect is empty if we have no window.
|
||||||
|
* Source/NSText.m: ([-redisplayForLineRange:]) fixed error drawing
|
||||||
|
into wrong view.
|
||||||
|
|
||||||
Wed Feb 17 9:04:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
Wed Feb 17 9:04:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
* Tools/make_services.m: Updated for change in NSProcessInfo
|
* Tools/make_services.m: Updated for change in NSProcessInfo
|
||||||
|
|
|
@ -1192,12 +1192,18 @@ typedef enum
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-(void) redisplayForLineRange:(NSRange) redrawLineRange
|
-(void) redisplayForLineRange: (NSRange)redrawLineRange
|
||||||
{ BOOL didLock=NO;
|
{
|
||||||
|
BOOL didLock = NO;
|
||||||
|
|
||||||
if([self window] && [[self class] focusView] != self)
|
if ([self window] == nil)
|
||||||
{ [self lockFocus]; didLock=YES;
|
return;
|
||||||
}
|
|
||||||
|
if ([[self class] focusView] != self)
|
||||||
|
{
|
||||||
|
[self lockFocus];
|
||||||
|
didLock = YES;
|
||||||
|
}
|
||||||
|
|
||||||
if([lineLayoutInformation count] && redrawLineRange.location < [lineLayoutInformation count] && redrawLineRange.length)
|
if([lineLayoutInformation count] && redrawLineRange.location < [lineLayoutInformation count] && redrawLineRange.length)
|
||||||
{ _GNULineLayoutInfo *firstInfo=[lineLayoutInformation objectAtIndex:redrawLineRange.location];
|
{ _GNULineLayoutInfo *firstInfo=[lineLayoutInformation objectAtIndex:redrawLineRange.location];
|
||||||
|
|
|
@ -84,9 +84,9 @@ static PSMatrix *flip = nil;
|
||||||
*/
|
*/
|
||||||
+ (NSView*) focusView
|
+ (NSView*) focusView
|
||||||
{
|
{
|
||||||
NSMutableDictionary*dict = [[NSThread currentThread] threadDictionary];
|
NSMutableDictionary *dict = [[NSThread currentThread] threadDictionary];
|
||||||
NSMutableArray*stack = [dict objectForKey: viewThreadKey];
|
NSMutableArray *stack = [dict objectForKey: viewThreadKey];
|
||||||
NSView*current_view = nil;
|
NSView *current_view = nil;
|
||||||
|
|
||||||
if (stack)
|
if (stack)
|
||||||
{
|
{
|
||||||
|
@ -104,8 +104,8 @@ static PSMatrix *flip = nil;
|
||||||
{
|
{
|
||||||
if (focusView)
|
if (focusView)
|
||||||
{
|
{
|
||||||
NSMutableDictionary*dict = [[NSThread currentThread] threadDictionary];
|
NSMutableDictionary *dict = [[NSThread currentThread] threadDictionary];
|
||||||
NSMutableArray*stack = [dict objectForKey: viewThreadKey];
|
NSMutableArray *stack = [dict objectForKey: viewThreadKey];
|
||||||
|
|
||||||
if (stack == nil)
|
if (stack == nil)
|
||||||
{
|
{
|
||||||
|
@ -127,11 +127,11 @@ static PSMatrix *flip = nil;
|
||||||
* Remove the top focusView for the current thread from the stack
|
* Remove the top focusView for the current thread from the stack
|
||||||
* and return the new focusView (or nil if the stack is now empty).
|
* and return the new focusView (or nil if the stack is now empty).
|
||||||
*/
|
*/
|
||||||
+ (NSView*)popFocusView
|
+ (NSView*) popFocusView
|
||||||
{
|
{
|
||||||
NSMutableDictionary*dict = [[NSThread currentThread] threadDictionary];
|
NSMutableDictionary *dict = [[NSThread currentThread] threadDictionary];
|
||||||
NSMutableArray*stack = [dict objectForKey: viewThreadKey];
|
NSMutableArray *stack = [dict objectForKey: viewThreadKey];
|
||||||
NSView*v = nil;
|
NSView *v = nil;
|
||||||
|
|
||||||
if (stack)
|
if (stack)
|
||||||
{
|
{
|
||||||
|
@ -300,9 +300,9 @@ static PSMatrix *flip = nil;
|
||||||
return [super_view opaqueAncestor];
|
return [super_view opaqueAncestor];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) removeFromSuperviewWithoutNeedinfDisplay
|
- (void) removeFromSuperviewWithoutNeedingDisplay
|
||||||
{
|
{
|
||||||
NSMutableArray*views;
|
NSMutableArray *views;
|
||||||
|
|
||||||
if (!super_view) // if no superview then just return
|
if (!super_view) // if no superview then just return
|
||||||
return;
|
return;
|
||||||
|
@ -317,8 +317,8 @@ static PSMatrix *flip = nil;
|
||||||
|
|
||||||
- (void) removeFromSuperview
|
- (void) removeFromSuperview
|
||||||
{
|
{
|
||||||
NSMutableArray*views;
|
NSMutableArray *views;
|
||||||
NSWindow*win;
|
NSWindow *win;
|
||||||
|
|
||||||
if (!super_view) // if no superview then just return
|
if (!super_view) // if no superview then just return
|
||||||
return;
|
return;
|
||||||
|
@ -1003,7 +1003,7 @@ static PSMatrix *flip = nil;
|
||||||
for (i = 0, count = [sub_views count]; i < count; i++)
|
for (i = 0, count = [sub_views count]; i < count; i++)
|
||||||
{
|
{
|
||||||
NSRect intersection;
|
NSRect intersection;
|
||||||
NSView*subview = [sub_views objectAtIndex: i];
|
NSView *subview = [sub_views objectAtIndex: i];
|
||||||
NSRect subviewFrame = subview->frame;
|
NSRect subviewFrame = subview->frame;
|
||||||
|
|
||||||
if ([subview->frameMatrix isRotated])
|
if ([subview->frameMatrix isRotated])
|
||||||
|
@ -1093,7 +1093,7 @@ static PSMatrix *flip = nil;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NSView*firstOpaque = [self opaqueAncestor];
|
NSView *firstOpaque = [self opaqueAncestor];
|
||||||
|
|
||||||
rect = [firstOpaque convertRect: rect fromView: self];
|
rect = [firstOpaque convertRect: rect fromView: self];
|
||||||
[firstOpaque displayRectIgnoringOpacity: rect];
|
[firstOpaque displayRectIgnoringOpacity: rect];
|
||||||
|
@ -1159,8 +1159,10 @@ static PSMatrix *flip = nil;
|
||||||
- (void)drawRect: (NSRect)rect
|
- (void)drawRect: (NSRect)rect
|
||||||
{}
|
{}
|
||||||
|
|
||||||
- (NSRect)visibleRect
|
- (NSRect) visibleRect
|
||||||
{
|
{
|
||||||
|
if (!window)
|
||||||
|
return NSZeroRect;
|
||||||
if (!super_view)
|
if (!super_view)
|
||||||
return bounds;
|
return bounds;
|
||||||
else
|
else
|
||||||
|
@ -1271,7 +1273,7 @@ static PSMatrix *flip = nil;
|
||||||
//
|
//
|
||||||
- (void) addCursorRect: (NSRect)aRect cursor: (NSCursor*)anObject
|
- (void) addCursorRect: (NSRect)aRect cursor: (NSCursor*)anObject
|
||||||
{
|
{
|
||||||
GSTrackingRect*m;
|
GSTrackingRect *m;
|
||||||
|
|
||||||
m = [[[GSTrackingRect alloc] initWithRect: aRect
|
m = [[[GSTrackingRect alloc] initWithRect: aRect
|
||||||
tag: 0
|
tag: 0
|
||||||
|
@ -1382,7 +1384,7 @@ static PSMatrix *flip = nil;
|
||||||
- (void) removeTrackingRect: (NSTrackingRectTag)tag
|
- (void) removeTrackingRect: (NSTrackingRectTag)tag
|
||||||
{
|
{
|
||||||
unsigned i, j;
|
unsigned i, j;
|
||||||
GSTrackingRect*m;
|
GSTrackingRect *m;
|
||||||
|
|
||||||
j = [tracking_rects count];
|
j = [tracking_rects count];
|
||||||
for (i = 0;i < j; ++i)
|
for (i = 0;i < j; ++i)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue