summaryrefslogtreecommitdiff
path: root/cocoa/BrowserView.m
diff options
context:
space:
mode:
authorSven Weidauer <sven.weidauer@gmail.com>2011-01-28 14:08:42 +0000
committerSven Weidauer <sven.weidauer@gmail.com>2011-01-28 14:08:42 +0000
commit3ba2596f5c5c82af5c342359e29e9f65160f4f56 (patch)
treeeec2ccca2d3bf9d4201587c37ce19b2bde2415e7 /cocoa/BrowserView.m
parentf56b20994ea693d36b2bcc8c99942f50e1fd6814 (diff)
downloadnetsurf-3ba2596f5c5c82af5c342359e29e9f65160f4f56.tar.gz
netsurf-3ba2596f5c5c82af5c342359e29e9f65160f4f56.tar.bz2
Implemented frames and handling reformats the right way using browser_reformat_pending.
svn path=/trunk/netsurf/; revision=11518
Diffstat (limited to 'cocoa/BrowserView.m')
-rw-r--r--cocoa/BrowserView.m16
1 files changed, 10 insertions, 6 deletions
diff --git a/cocoa/BrowserView.m b/cocoa/BrowserView.m
index d5e8d0aff..fd7c938db 100644
--- a/cocoa/BrowserView.m
+++ b/cocoa/BrowserView.m
@@ -41,7 +41,6 @@
@synthesize browser;
@synthesize caretTimer;
-@synthesize resizing = isResizing;
static const CGFloat CaretWidth = 1.0;
static const NSTimeInterval CaretBlinkTime = 0.8;
@@ -377,11 +376,8 @@ static browser_mouse_state cocoa_mouse_flags_for_event( NSEvent *evt )
- (void) adjustFrame;
{
- if (!isResizing) {
- NSSize frameSize = [[self superview] frame].size;
- browser_window_reformat( browser, cocoa_pt_to_px( frameSize.width ), cocoa_pt_to_px( frameSize.height ) );
- }
-
+ browser->reformat_pending = true;
+ browser_reformat_pending = true;
[super adjustFrame];
}
@@ -422,4 +418,12 @@ static browser_mouse_state cocoa_mouse_flags_for_event( NSEvent *evt )
return NSHeight( [[self superview] frame] ) - [[self enclosingScrollView] pageScroll];
}
+- (void) reformat;
+{
+ if (!browser->reformat_pending) return;
+
+ NSRect size = [[self superview] frame];
+ browser_window_reformat( browser, cocoa_pt_to_px( NSWidth( size ) ), cocoa_pt_to_px( NSHeight( size ) ) );
+}
+
@end