Changeset 35870 in vbox
- Timestamp:
- Feb 7, 2011 1:18:02 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm
r35865 r35870 472 472 } 473 473 474 /* Make an empty interface declaration of QCocoaWindowDelegate to shut up the475 compiler. */476 @interface QCocoaWindowDelegate: NSObject {}477 @end478 479 474 /* Our resize proxy singleton. This class has two major tasks. First it is used 480 475 to proxy the windowWillResize selector of the Qt delegate. As this is class … … 484 479 { 485 480 NSMutableArray *m_pArray; 481 bool m_fInit; 486 482 } 487 483 +(UIResizeProxy*)sharedResizeProxy; … … 502 498 -(id)init 503 499 { 504 if ((self = [super init])) 500 self = [super init]; 501 502 m_fInit = false; 503 504 return self; 505 } 506 - (void)addWindow:(NSWindow*)pWindow 507 { 508 if (!m_fInit) 505 509 { 506 510 /* Create an array which contains the registered windows. */ … … 509 513 original method with our own one and reroute the original one to 510 514 another name. */ 511 Class oriClass = [ QCocoaWindowDelegateclass];515 Class oriClass = [[pWindow delegate] class]; 512 516 Class myClass = [UIResizeProxy class]; 513 517 SEL oriSel = @selector(windowWillResize:toSize:); … … 521 525 /* Add a new method to our class with the old implementation. */ 522 526 class_addMethod(oriClass, qtSel, old, method_getTypeEncoding(m3)); 523 } 524 return self; 525 } 526 - (void)addWindow:(NSWindow*)pWindow 527 { 527 m_fInit = true; 528 } 528 529 [m_pArray addObject:pWindow]; 529 530 }
Note:
See TracChangeset
for help on using the changeset viewer.

