From bd276020aab56e37388487d94aa1321fdae93610 Mon Sep 17 00:00:00 2001 From: François Revel Date: Mon, 6 Oct 2008 02:07:55 +0000 Subject: - 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 --- beos/beos_window.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'beos') 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(); -- cgit v1.2.3