From: <de...@us...> - 2009-09-27 03:01:16
|
Revision: 1840 http://iterm.svn.sourceforge.net/iterm/?rev=1840&view=rev Author: delx Date: 2009-09-27 03:01:04 +0000 (Sun, 27 Sep 2009) Log Message: ----------- Fixed focus follows mouse not working on scrollback buffer (#2764633) Modified Paths: -------------- trunk/Changelog trunk/PTYSession.m trunk/PTYTextView.m trunk/PTYWindow.m Modified: trunk/Changelog =================================================================== --- trunk/Changelog 2009-09-26 01:43:46 UTC (rev 1839) +++ trunk/Changelog 2009-09-27 03:01:04 UTC (rev 1840) @@ -1,3 +1,6 @@ +2009-09-27 delx + * Fixed focus follows mouse not working when viewing scrollback (#2764633) + 2009-09-26 delx * Fixed option key as esc/meta under Snow Leopard (#2849154) Modified: trunk/PTYSession.m =================================================================== --- trunk/PTYSession.m 2009-09-26 01:43:46 UTC (rev 1839) +++ trunk/PTYSession.m 2009-09-27 03:01:04 UTC (rev 1840) @@ -306,9 +306,7 @@ [self setBell: NO]; PTYScroller* ptys=(PTYScroller*)[SCROLLVIEW verticalScroller]; [SHELL writeTask: data]; - // Make sure we scroll down to the end - [TEXTVIEW scrollEnd]; - [ptys setUserScroll: NO]; + [ptys setUserScroll:NO]; } } else { @@ -1751,6 +1749,9 @@ } [TEXTVIEW refresh]; + if(![(PTYScroller*)([SCROLLVIEW verticalScroller]) userScroll]) { + [TEXTVIEW scrollEnd]; + } [self scheduleUpdateSoon:NO]; } Modified: trunk/PTYTextView.m =================================================================== --- trunk/PTYTextView.m 2009-09-26 01:43:46 UTC (rev 1839) +++ trunk/PTYTextView.m 2009-09-27 03:01:04 UTC (rev 1840) @@ -583,32 +583,31 @@ [dataSource resetDirty]; } -// We override this method since both refresh and window resize can conflict resulting in this happening twice -// So we do not allow the size to be set larger than what the data source can fill +// We override this method since both refresh and window resize can conflict +// resulting in this happening twice So we do not allow the size to be set +// larger than what the data source can fill - (void)setFrameSize:(NSSize)frameSize { // Force the height to always be correct frameSize.height = [dataSource numberOfLines] * lineHeight; [super setFrameSize:frameSize]; +} - if(![(PTYScroller *)([[self enclosingScrollView] verticalScroller]) userScroll]) { - [self scrollEnd]; - } +- (void)refresh +{ + if(dataSource == nil) return; // reset tracking rect if(trackingRectTag) { [self removeTrackingRect:trackingRectTag]; } trackingRectTag = [self addTrackingRect:[self visibleRect] owner:self userData:nil assumeInside:NO]; -} -- (void)refresh -{ - if(dataSource == nil) return; - + // number of lines that have disappeared if circular buffer is full int scrollbackOverflow = [dataSource scrollbackOverflow]; [dataSource resetScrollbackOverflow]; + // frame size changed? int height = [dataSource numberOfLines] * lineHeight; NSRect frame = [self frame]; Modified: trunk/PTYWindow.m =================================================================== --- trunk/PTYWindow.m 2009-09-26 01:43:46 UTC (rev 1839) +++ trunk/PTYWindow.m 2009-09-27 03:01:04 UTC (rev 1840) @@ -275,18 +275,4 @@ return YES; } -- (void)sendEvent:(NSEvent *)event -{ - // NSLog(@"%s: 0x%x", __PRETTY_FUNCTION__, self); - - if([event type] == NSMouseEntered) - { - //NSLog(@"window mouse entered"); - if([[PreferencePanel sharedInstance] focusFollowsMouse]) - [self makeKeyWindow]; - } - - if (super) [super sendEvent:event]; -} - @end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |