mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:20:38 +00:00
Lock focus fixes - get cells to lock focus before drawing themselves.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4924 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0424173e96
commit
98a649c60a
13 changed files with 85 additions and 25 deletions
|
@ -77,7 +77,7 @@ static Class cellClass;
|
|||
- (id) initWithFrame: (NSRect)frameRect
|
||||
{
|
||||
[super initWithFrame: frameRect];
|
||||
[self setCell: AUTORELEASE([cellClass new])];
|
||||
[self setCell: AUTORELEASE([[[self class] cellClass] new])];
|
||||
tag = 0;
|
||||
|
||||
return self;
|
||||
|
@ -319,7 +319,8 @@ static Class cellClass;
|
|||
{
|
||||
if (cell == aCell)
|
||||
{
|
||||
[cell drawInteriorWithFrame: bounds inView: self];
|
||||
[cell drawInteriorWithFrame: [cell drawingRectForBounds: bounds]
|
||||
inView: self];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -413,7 +414,6 @@ static Class cellClass;
|
|||
unsigned int event_mask = NSLeftMouseDownMask | NSLeftMouseUpMask |
|
||||
NSMouseMovedMask | NSLeftMouseDraggedMask |
|
||||
NSRightMouseDraggedMask;
|
||||
|
||||
NSDebugLog(@"NSControl mouseDown\n");
|
||||
|
||||
if (![self isEnabled])
|
||||
|
@ -426,8 +426,6 @@ static Class cellClass;
|
|||
|
||||
[window _captureMouse: self];
|
||||
|
||||
[self lockFocus];
|
||||
|
||||
e = theEvent;
|
||||
while (!done) // loop until mouse goes up
|
||||
{
|
||||
|
@ -472,7 +470,7 @@ static Class cellClass;
|
|||
[cell highlight: NO withFrame: bounds inView: self];
|
||||
[window flushWindow];
|
||||
}
|
||||
[self unlockFocus];
|
||||
|
||||
[cell sendActionOn: oldActionMask];
|
||||
|
||||
if (mouseUp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue