Ticket #67408: gtk3_gdkquartznswindows_c.patch

File gtk3_gdkquartznswindows_c.patch, 963 bytes (added by rmottola (Riccardo), 9 months ago)

some 10.5/10.6 replacement methods

  • gdk/quartz/GdkQuartzNSWindow.c

    old new  
    2222#include "gdkdnd-quartz.h"
    2323#include "gdkprivate-quartz.h"
    2424
     25#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
     26
     27@protocol NSWindowDelegate
     28@end
     29       
     30@interface NSWindow (GTKExt)
     31- (NSRect) convertRectToScreen: (NSRect)aRect;
     32- (NSRect) convertRectFromScreen: (NSRect)aRect;
     33@end
     34
     35@implementation NSWindow (GTKExt)
     36- (NSRect) convertRectToScreen: (NSRect)aRect
     37{
     38  NSRect result = aRect;
     39  NSPoint origin = result.origin;
     40  result.origin = [self convertBaseToScreen:origin];
     41  return result;
     42}
     43- (NSRect) convertRectFromScreen: (NSRect)aRect
     44{
     45  NSRect result = aRect;
     46  NSPoint origin = result.origin;
     47  result.origin = [self convertScreenToBase:origin];
     48  return result;
     49}
     50@end
     51
     52#endif
     53
    2554@implementation GdkQuartzNSWindow
    2655
    2756- (void)windowWillClose:(NSNotification*)notification