equal
deleted
inserted
replaced
1147 if (current == NULL) |
1147 if (current == NULL) |
1148 return NULL; |
1148 return NULL; |
1149 } |
1149 } |
1150 |
1150 |
1151 if (qz_window != nil) { |
1151 if (qz_window != nil) { |
1152 NSGraphicsContext *ctx; |
1152 nsgfx_context = [NSGraphicsContext graphicsContextWithWindow:qz_window]; |
1153 ctx = [NSGraphicsContext graphicsContextWithWindow:qz_window]; |
1153 [NSGraphicsContext setCurrentContext:nsgfx_context]; |
1154 [NSGraphicsContext setCurrentContext:ctx]; |
|
1155 } |
1154 } |
1156 |
1155 |
1157 /* Setup the new pixel format */ |
1156 /* Setup the new pixel format */ |
1158 { |
1157 { |
1159 int amask = 0, |
1158 int amask = 0, |
1505 |
1504 |
1506 /* Do nothing if miniaturized */ |
1505 /* Do nothing if miniaturized */ |
1507 } |
1506 } |
1508 |
1507 |
1509 else { |
1508 else { |
1510 CGContextRef cgc = (CGContextRef) |
1509 NSGraphicsContext *ctx = [NSGraphicsContext currentContext]; |
1511 [[NSGraphicsContext currentContext] graphicsPort]; |
1510 if (ctx != nsgfx_context) { /* uhoh, you might be rendering from another thread... */ |
|
1511 [NSGraphicsContext setCurrentContext:nsgfx_context]; |
|
1512 ctx = nsgfx_context; |
|
1513 } |
|
1514 CGContextRef cgc = (CGContextRef) [ctx graphicsPort]; |
1512 QZ_DrawResizeIcon (this); |
1515 QZ_DrawResizeIcon (this); |
1513 CGContextFlush (cg_context); |
1516 CGContextFlush (cg_context); |
1514 CGImageRef image = CGBitmapContextCreateImage (cg_context); |
1517 CGImageRef image = CGBitmapContextCreateImage (cg_context); |
1515 CGRect rectangle = CGRectMake (0,0,[window_view frame].size.width,[window_view frame].size.height); |
1518 CGRect rectangle = CGRectMake (0,0,[window_view frame].size.width,[window_view frame].size.height); |
1516 |
1519 |