# HG changeset patch # User Zachary West # Date 1257105967 18000 # Node ID 63a5052fc169dd84619ab7360929a16c9f683d55 # Parent d88a4b7a70a8f19ca5390084db2909099fe319b7 Always try and reposition the contact list if we think it should be. Fixes #12716. As of 10.6, the OS appears to be messing with window position and visibility in a way that was confusing the contact list hiding code. It simultaneously thought the window was both hidden and in the right position. Counteract this by having it move to the correct position. The if here was likely to try and guard against this being called too often, but it doesn't appear it's called outside of when necessary. Mess with it a little to control animation, not movement. diff -r d88a4b7a70a8f19ca5390084db2909099fe319b7 -r 63a5052fc169dd84619ab7360929a16c9f683d55 Source/AIListWindowController.m --- a/Source/AIListWindowController.m Sun Nov 01 14:04:11 2009 -0500 +++ b/Source/AIListWindowController.m Sun Nov 01 15:06:07 2009 -0500 @@ -318,7 +318,7 @@ showOnAllSpaces = [[prefDict objectForKey:KEY_CL_ALL_SPACES] boolValue]; [[self window] setCollectionBehavior:showOnAllSpaces ? NSWindowCollectionBehaviorCanJoinAllSpaces : NSWindowCollectionBehaviorDefault]; - + if (windowHidingStyle == AIContactListWindowHidingStyleSliding) { if (!slideWindowIfNeededTimer) { slideWindowIfNeededTimer = [[NSTimer scheduledTimerWithTimeInterval:DOCK_HIDING_MOUSE_POLL_INTERVAL @@ -722,7 +722,6 @@ //If we're hiding the window (generally) but now sliding it on screen, make sure it's on top if (windowHidingStyle == AIContactListWindowHidingStyleSliding) { [self setWindowLevel:NSFloatingWindowLevel]; - [[self window] setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces]; overrodeWindowLevel = YES; @@ -812,7 +811,6 @@ shouldSlide = YES; } } - return shouldSlide; } @@ -1225,25 +1223,25 @@ { if ([self windowSlidOffScreenEdgeMask] != AINoEdges) { NSWindow *window = [self window]; - NSRect windowFrame = [window frame]; - if (!NSEqualRects(windowFrame, oldFrame)) { - //Restore shadow and frame if we're appearing from having slid off-screen - [window setHasShadow:[[adium.preferenceController preferenceForKey:KEY_CL_WINDOW_HAS_SHADOW - group:PREF_GROUP_CONTACT_LIST] boolValue]]; - [window orderFront:nil]; - [contactListController contactListWillSlideOnScreen]; + animate = animate && !NSEqualRects(window.frame, oldFrame); + + //Restore shadow and frame if we're appearing from having slid off-screen + [window setHasShadow:[[adium.preferenceController preferenceForKey:KEY_CL_WINDOW_HAS_SHADOW + group:PREF_GROUP_CONTACT_LIST] boolValue]]; + [window orderFront:nil]; + + [contactListController contactListWillSlideOnScreen]; - windowSlidOffScreenEdgeMask = AINoEdges; - - if (animate) { - [self slideWindowToPoint:oldFrame.origin]; - } else { - [self moveWindowToPoint:oldFrame.origin]; - } - - [windowLastScreen release]; windowLastScreen = nil; + windowSlidOffScreenEdgeMask = AINoEdges; + + if (animate) { + [self slideWindowToPoint:oldFrame.origin]; + } else { + [self moveWindowToPoint:oldFrame.origin]; } + + [windowLastScreen release]; windowLastScreen = nil; } }