summaryrefslogtreecommitdiff
path: root/src/video/cocoa/wnd_quartz.mm
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2010-12-21 16:00:42 +0000
committerplanetmaker <planetmaker@openttd.org>2010-12-21 16:00:42 +0000
commite38f96d60910846cdfed516f80282789bdb685f5 (patch)
treee240981434399ff66aa67c4983e3502281ae7ded /src/video/cocoa/wnd_quartz.mm
parent26575ab8f880a39dc9c07203d4f8b31eb667fdac (diff)
downloadopenttd-e38f96d60910846cdfed516f80282789bdb685f5.tar.xz
(svn r21576) -Codechange: [OSX] Deduplicate code by moving the handling of the view for windowed screen drivers to a common class
Diffstat (limited to 'src/video/cocoa/wnd_quartz.mm')
-rw-r--r--src/video/cocoa/wnd_quartz.mm18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm
index 50712cf9d..9e52e526f 100644
--- a/src/video/cocoa/wnd_quartz.mm
+++ b/src/video/cocoa/wnd_quartz.mm
@@ -62,15 +62,10 @@ class WindowQuartzSubdriver;
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag;
@end
-/* Subclass of NSView to fix Quartz rendering */
-@interface OTTD_QuartzView : NSView {
- WindowQuartzSubdriver *driver;
-}
-
+/* Subclass of OTTD_CocoaView to fix Quartz rendering */
+@interface OTTD_QuartzView : OTTD_CocoaView
- (void)setDriver:(WindowQuartzSubdriver*)drv;
-
-- (void)drawRect:(NSRect)rect;
-- (BOOL)isOpaque;
+- (void)drawRect:(NSRect)invalidRect;
@end
class WindowQuartzSubdriver: public CocoaSubdriver {
@@ -239,13 +234,6 @@ static CGColorSpaceRef QZ_GetCorrectColorSpace()
{
driver = drv;
}
-
-
-- (BOOL)isOpaque
-{
- return YES;
-}
-
- (void)drawRect:(NSRect)invalidRect
{
if (driver->cgcontext == NULL) return;