Changeset 10025 for trunk/macosx/DragOverlayWindow.m
- Timestamp:
- Jan 28, 2010, 3:16:55 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/DragOverlayWindow.m
r9844 r10025 27 27 #import "NSStringAdditions.h" 28 28 29 @interface DragOverlayWindow (Private) 30 31 - (void) resizeWindow; 32 33 @end 34 29 35 @implementation DragOverlayWindow 30 36 31 37 - (id) initWithLib: (tr_session *) lib forWindow: (NSWindow *) window 32 38 { 33 if ((self = ([super initWithContentRect: NS MakeRect(0, 0, 1.0, 1.0)styleMask: NSBorderlessWindowMask39 if ((self = ([super initWithContentRect: NSZeroRect styleMask: NSBorderlessWindowMask 34 40 backing: NSBackingStoreBuffered defer: NO]))) 35 41 { … … 61 67 62 68 [window addChildWindow: self ordered: NSWindowAbove]; 69 [self setFrame: [window frame] display: NO]; 70 71 [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(resizeWindow) 72 name: NSWindowDidResizeNotification object: window]; 63 73 } 64 74 return self; … … 67 77 - (void) dealloc 68 78 { 79 [[NSNotificationCenter defaultCenter] removeObserver: self]; 80 69 81 [fFadeInAnimation release]; 70 82 [fFadeOutAnimation release]; … … 176 188 177 189 @end 190 191 @implementation DragOverlayWindow (Private) 192 193 - (void) resizeWindow 194 { 195 [self setFrame: [[self parentWindow] frame] display: NO]; 196 } 197 198 @end
Note: See TracChangeset
for help on using the changeset viewer.