Commits

Brandon Walkin  committed 2b3df1e

Fixed a bug where a sheet's bottom bar could move the sheet around

  • Participants
  • Parent commits a1f7130

Comments (0)

Files changed (4)

File BWAddMiniBottomBar.m

 //
 
 #import "BWAddMiniBottomBar.h"
+#import "NSWindow-NSTimeMachineSupport.h"
 
 @interface NSWindow (BWBBPrivate)
 - (void)setBottomCornerRounded:(BOOL)flag;
 {
 	if ([[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
 		[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];	
+	
+	if ([[self window] isSheet] && [[self window] respondsToSelector:@selector(setMovable:)])
+		[[self window] setMovable:NO];
 }
 
 - (NSRect)bounds

File BWAddRegularBottomBar.m

 //
 
 #import "BWAddRegularBottomBar.h"
+#import "NSWindow-NSTimeMachineSupport.h"
 
 @implementation BWAddRegularBottomBar
 
 {
 	if ([[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
 		[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];	
+	
+	if ([[self window] isSheet] && [[self window] respondsToSelector:@selector(setMovable:)])
+		[[self window] setMovable:NO];
 }
 
 - (NSRect)bounds

File BWAddSheetBottomBar.m

 //
 
 #import "BWAddSheetBottomBar.h"
+#import "NSWindow-NSTimeMachineSupport.h"
 
 @interface NSWindow (BWPrivate)
 - (void)setBottomCornerRounded:(BOOL)flag;
 {
 	if ([[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
 		[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];	
+	
+	if ([[self window] isSheet] && [[self window] respondsToSelector:@selector(setMovable:)])
+		[[self window] setMovable:NO];
 }
 
 - (NSRect)bounds

File BWAddSmallBottomBar.m

 //
 
 #import "BWAddSmallBottomBar.h"
+#import "NSWindow-NSTimeMachineSupport.h"
 
 @implementation BWAddSmallBottomBar
 
 {
 	if ([[self window] contentBorderThicknessForEdge:NSMinYEdge] == 0)
 		[self performSelector:@selector(addBottomBar) withObject:nil afterDelay:0];	
+	
+	if ([[self window] isSheet] && [[self window] respondsToSelector:@selector(setMovable:)])
+		[[self window] setMovable:NO];
 }
 
 - (NSRect)bounds