summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-06 02:07:55 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-06 02:07:55 +0000
commitbd276020aab56e37388487d94aa1321fdae93610 (patch)
tree69f83a232ce1fc81c21305ee31c988a5bc343b5c
parent482ffb28875d223ee4b5ec3df7be8a2ca02cb8a8 (diff)
downloadnetsurf-bd276020aab56e37388487d94aa1321fdae93610.tar.gz
netsurf-bd276020aab56e37388487d94aa1321fdae93610.tar.bz2
- fix some coordinate handling
- bail out trying to redraw if there are more than 1 pending resize, this almost suppresses flicker on resize, and also avoids having the window busy for 10s redrawing 20 times. svn path=/trunk/netsurf/; revision=5495
-rw-r--r--beos/beos_window.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/beos/beos_window.cpp b/beos/beos_window.cpp
index e7b2844bb..8650aeca5 100644
--- a/beos/beos_window.cpp
+++ b/beos/beos_window.cpp
@@ -771,6 +771,10 @@ void nsbeos_window_expose_event(BView *view, gui_window *g, BMessage *message)
assert(z);
assert(g->view == view);
+ // we'll be resizing = reflowing = redrawing everything anyway...
+ if (g->pending_resizes > 1)
+ return;
+
if (message->FindRect("rect", &updateRect) < B_OK)
return;
@@ -796,8 +800,8 @@ void nsbeos_window_expose_event(BView *view, gui_window *g, BMessage *message)
(view->Bounds().Height() + 1) * scale,
updateRect.left,
updateRect.top,
- updateRect.right,
- updateRect.bottom,
+ updateRect.right + 1,
+ updateRect.bottom + 1,
g->bw->scale, 0xFFFFFF);
if (g->careth != 0)
@@ -1116,8 +1120,8 @@ void nsbeos_window_process_reformats(void)
view->UnlockLooper();
#warning XXX why - 1 & - 2 !???
browser_window_reformat(g->bw,
- bounds.Width() + 1 - 1 /* - 2*/,
- bounds.Height() + 1 - 1);
+ bounds.Width() + 1 /* - 2*/,
+ bounds.Height() + 1);
}
#warning WRITEME
@@ -1211,7 +1215,7 @@ void gui_window_redraw(struct gui_window *g, int x0, int y0, int x1, int y1)
nsbeos_current_gc_set(g->view);
//XXX +1 ??
- g->view->Invalidate(BRect(x0, y0, x1, y1));
+ g->view->Invalidate(BRect(x0, y0, x1 - 1, y1 - 1));
nsbeos_current_gc_set(NULL);
g->view->UnlockLooper();