Mercurial > dwindows
comparison mac/dw.m @ 2153:9c1a64ebb686
Mac: Fix a problem with the selector specification and a CGContext 0x0
warning, during dw_pixmap_bitblt(), abort with no destination context.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 16 Sep 2020 10:33:19 +0000 |
parents | d299b5acc507 |
children | 1337859c1a20 |
comparison
equal
deleted
inserted
replaced
2152:d299b5acc507 | 2153:9c1a64ebb686 |
---|---|
1268 return; | 1268 return; |
1269 } | 1269 } |
1270 _DWLastDrawable = bltinfo->dest; | 1270 _DWLastDrawable = bltinfo->dest; |
1271 } | 1271 } |
1272 #endif | 1272 #endif |
1273 if([bltsrc isMemberOfClass:[NSBitmapImageRep class]]) | 1273 if(bltdest && [bltsrc isMemberOfClass:[NSBitmapImageRep class]]) |
1274 { | 1274 { |
1275 NSBitmapImageRep *rep = bltsrc; | 1275 NSBitmapImageRep *rep = bltsrc; |
1276 NSImage *image = [NSImage alloc]; | 1276 NSImage *image = [NSImage alloc]; |
1277 SEL siwc = NSSelectorFromString(@"initWithCGImage"); | 1277 SEL siwc = NSSelectorFromString(@"initWithCGImage"); |
1278 NSCompositingOperation op = DWCompositingOperationSourceOver; | 1278 NSCompositingOperation op = DWCompositingOperationSourceOver; |
12413 { | 12413 { |
12414 NSURL *retval = [ws URLForApplicationWithBundleIdentifier:nsprogram]; | 12414 NSURL *retval = [ws URLForApplicationWithBundleIdentifier:nsprogram]; |
12415 | 12415 |
12416 if(!retval) | 12416 if(!retval) |
12417 { | 12417 { |
12418 SEL sfpfa = NSSelectorFromString(@"fullPathForApplication"); | 12418 SEL sfpfa = NSSelectorFromString(@"fullPathForApplication:"); |
12419 | 12419 |
12420 if([ws respondsToSelector:sfpfa]) | 12420 if([ws respondsToSelector:sfpfa]) |
12421 { | 12421 { |
12422 DWIMP ifpfa = (DWIMP)[ws methodForSelector:sfpfa]; | 12422 DWIMP ifpfa = (DWIMP)[ws methodForSelector:sfpfa]; |
12423 NSString *apppath = ifpfa(ws, sfpfa, nsprogram); | 12423 NSString *apppath = ifpfa(ws, sfpfa, nsprogram); |
12495 }]; | 12495 }]; |
12496 } | 12496 } |
12497 else | 12497 else |
12498 #endif | 12498 #endif |
12499 { | 12499 { |
12500 SEL sla = NSSelectorFromString(@"launchApplication"); | 12500 SEL sla = NSSelectorFromString(@"launchApplication:"); |
12501 | 12501 |
12502 if([ws respondsToSelector:sla]) | 12502 if([ws respondsToSelector:sla]) |
12503 { | 12503 { |
12504 DWIMP ila = (DWIMP)[ws methodForSelector:sla]; | 12504 DWIMP ila = (DWIMP)[ws methodForSelector:sla]; |
12505 ila(ws, sla, nsprogram); | 12505 ila(ws, sla, nsprogram); |