summaryrefslogtreecommitdiff
path: root/frontends/cocoa
diff options
context:
space:
mode:
authorSven Weidauer <sven@5sw.de>2017-06-07 22:32:17 +0200
committerSven Weidauer <sven@5sw.de>2017-06-07 22:32:17 +0200
commitf81e8a53d7f532f22da163f3bdd694184b8e72a8 (patch)
tree2bbddfb063184d1565095121af45c15522e57130 /frontends/cocoa
parent8fd52c32bcedaa83a88aa22e4100e66c50c553c2 (diff)
downloadnetsurf-f81e8a53d7f532f22da163f3bdd694184b8e72a8.tar.gz
netsurf-f81e8a53d7f532f22da163f3bdd694184b8e72a8.tar.bz2
Only adjust frame when minimum size actually changes. Fixes high CPU load.
Diffstat (limited to 'frontends/cocoa')
-rw-r--r--frontends/cocoa/ScrollableView.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/frontends/cocoa/ScrollableView.m b/frontends/cocoa/ScrollableView.m
index b2210d059..c495b1d93 100644
--- a/frontends/cocoa/ScrollableView.m
+++ b/frontends/cocoa/ScrollableView.m
@@ -30,8 +30,10 @@
- (void)setMinimumSize:(NSSize)newSize
{
- _minimumSize = newSize;
- [self adjustFrame];
+ if (!CGSizeEqualToSize(_minimumSize, newSize)) {
+ _minimumSize = newSize;
+ [self adjustFrame];
+ }
}
- (void)adjustFrame