adium-1.4 2725:df393573b242: Always try and reposition the conta...
commits at adium.im
commits at adium.im
Sun Nov 1 20:06:11 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/df393573b242
revision: 2725:df393573b242
author: Zachary West <zacw at adium.im>
date: Sun Nov 01 15:06:07 2009 -0500
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.
diffs (70 lines):
diff -r 165b2bbc8f20 -r df393573b242 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;
}
}
More information about the commits
mailing list