mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 13:10:52 +00:00
Move previous lock focus up to NSButton - affects PSMTabBar in a bad way
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@39322 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8574bb74c2
commit
2f8c84d096
2 changed files with 27 additions and 27 deletions
|
@ -36,6 +36,13 @@
|
|||
#import "AppKit/NSButtonCell.h"
|
||||
#import "AppKit/NSEvent.h"
|
||||
#import "AppKit/NSWindow.h"
|
||||
#import "GNUstepGUI/GSTheme.h"
|
||||
|
||||
#if defined(__MINGW__)
|
||||
@interface NSView ()
|
||||
- (void) _lockFocusInContext: (NSGraphicsContext *)ctxt inRect: (NSRect)rect;
|
||||
@end
|
||||
#endif
|
||||
|
||||
//
|
||||
// class variables
|
||||
|
@ -543,4 +550,24 @@ static id buttonCellClass = nil;
|
|||
return [_cell sound];
|
||||
}
|
||||
|
||||
#if defined(__MINGW__)
|
||||
- (void) _lockFocusInContext: (NSGraphicsContext *)ctxt inRect: (NSRect)rect
|
||||
{
|
||||
// NSControl drawing bypasses the dirtyRect and draws the entire control causing issues
|
||||
// if the dirty rectangle is a partial rectangle since only the dirty rectangle
|
||||
// gets flushed. This causes problems with cairo drawing on windows since the
|
||||
// theme drawing (i.e. like WinUXTheme) draws directly into the HDC then does not
|
||||
// get flushed out causing partial control/text...
|
||||
if ([[[GSTheme theme] name] isEqualToString: @"GNUstep"] == NO)
|
||||
{
|
||||
// We'll have to assume that any them outside ours is mixing HDC and cairo drawing...
|
||||
[super _lockFocusInContext: ctxt inRect: _bounds];
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise use the dirty rectangle given us...
|
||||
[super _lockFocusInContext: ctxt inRect: rect];
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
|
|
@ -50,13 +50,6 @@
|
|||
#import "AppKit/NSWindow.h"
|
||||
#import "GSBindingHelpers.h"
|
||||
#import "NSViewPrivate.h"
|
||||
#import "GNUstepGUI/GSTheme.h"
|
||||
|
||||
#if defined(__MINGW__)
|
||||
@interface NSView ()
|
||||
- (void) _lockFocusInContext: (NSGraphicsContext *)ctxt inRect: (NSRect)rect;
|
||||
@end
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Class variables
|
||||
|
@ -677,26 +670,6 @@ static NSNotificationCenter *nc;
|
|||
return [_cell isOpaque];
|
||||
}
|
||||
|
||||
#if defined(__MINGW__)
|
||||
- (void) _lockFocusInContext: (NSGraphicsContext *)ctxt inRect: (NSRect)rect
|
||||
{
|
||||
// Our drawing bypasses the dirtyRect and draws the entire control causing issues
|
||||
// if the dirty rectangle is a partial rectangle since only the dirty rectangle
|
||||
// gets flushed. This causes problems with cairo drawing on windows since the
|
||||
// theme drawing (i.e. like WinUXTheme) draws directly into the HDC then does not
|
||||
// get flushed out causing partial control/text...
|
||||
if ([[[GSTheme theme] name] isEqualToString: @"GNUstep"] == NO)
|
||||
{
|
||||
// We'll have to assume that any them outside ours is mixing HDC and cairo drawing...
|
||||
[super _lockFocusInContext: ctxt inRect: _bounds];
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise use the dirty rectangle given us...
|
||||
[super _lockFocusInContext: ctxt inRect: rect];
|
||||
}
|
||||
#endif
|
||||
|
||||
- (void) drawRect: (NSRect)dirtyRect
|
||||
{
|
||||
[self drawCell: _cell];
|
||||
|
|
Loading…
Reference in a new issue