Author: mlytwyn
Date: Sat Jan 30 00:22:11 2016
New Revision: 39322
URL: http://svn.gna.org/viewcvs/gnustep?rev=39322&view=rev
Log:
Move previous lock focus up to NSButton - affects PSMTabBar in a bad way
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/NSButton.m
libs/gui/branches/gnustep_testplant_branch/Source/NSControl.m
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSButton.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSButton.m?rev=39322&r1=39321&r2=39322&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSButton.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSButton.m Sat Jan
30 00:22:11 2016
@@ -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 @@
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
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSControl.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSControl.m?rev=39322&r1=39321&r2=39322&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSControl.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSControl.m Sat Jan
30 00:22:11 2016
@@ -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 @@
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];
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs