From 9f55b1cc7d7a5ecad1055a0a11362117bf74f131 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Tue, 29 Nov 2011 21:22:01 +0000 Subject: Check return value of plotter->lock() svn path=/trunk/netsurf/; revision=13203 --- atari/browser.c | 14 ++------------ atari/toolbar.c | 3 ++- atari/treeview.c | 3 ++- 3 files changed, 6 insertions(+), 14 deletions(-) (limited to 'atari') diff --git a/atari/browser.c b/atari/browser.c index 9ed5aa3d1..7ab77cdd4 100755 --- a/atari/browser.c +++ b/atari/browser.c @@ -69,8 +69,6 @@ extern short last_drag_y; static void browser_process_scroll( struct gui_window * gw, LGRECT bwrect ); static void browser_redraw_content( struct gui_window * gw, int xoff, int yoff, struct rect * area ); -static void __CDECL browser_evnt_resize( COMPONENT * c, long buff[8], - void * data); static void __CDECL browser_evnt_destroy( COMPONENT * c, long buff[8], void * data); static void __CDECL browser_evnt_redraw( COMPONENT * c, long buff[8], @@ -123,9 +121,6 @@ struct s_browser * browser_create mt_CompEvntDataAttach( &app, bnew->comp, WM_DESTROY, browser_evnt_destroy, (void*)bnew ); - mt_CompEvntDataAttach( &app, bnew->comp, WM_SIZED, - browser_evnt_resize, (void*)gw - ); /* Set the gui_window owner. */ /* it is an link to the netsurf window system */ @@ -208,12 +203,6 @@ void browser_set_content_size(struct gui_window * gw, int w, int h) } } -static void __CDECL browser_evnt_resize( COMPONENT * c, long buff[8], void * data) -{ - /* Just a dummy to prevent second redraw (already handled within browser_win)*/ - printf("browser evnt resize"); - return; -} static void __CDECL browser_evnt_destroy( COMPONENT * c, long buff[8], void * data) { @@ -761,7 +750,8 @@ void browser_redraw( struct gui_window * gw ) clip.x1 = bwrect.g_w; clip.y1 = bwrect.g_h; plotter->clip( plotter, &clip ); - plotter->lock(plotter); + if( plotter->lock(plotter) == 0 ) + return; if( b->scroll.required == true && b->bw->current_content != NULL) { browser_process_scroll( gw, bwrect ); diff --git a/atari/toolbar.c b/atari/toolbar.c index a5e747295..0b7af6f37 100755 --- a/atari/toolbar.c +++ b/atari/toolbar.c @@ -415,7 +415,8 @@ void tb_url_redraw( struct gui_window * gw ) plotter->resize(plotter, work.g_w, work.g_h ); plotter->move(plotter, work.g_x, work.g_y ); - plotter->lock( plotter ); + if( plotter->lock( plotter ) == 0 ) + return; todo[0] = work.g_x; todo[1] = work.g_y; diff --git a/atari/treeview.c b/atari/treeview.c index 1c1c9b9ab..afe7930c5 100755 --- a/atari/treeview.c +++ b/atari/treeview.c @@ -294,7 +294,8 @@ void atari_treeview_redraw( NSTREEVIEW tv) plotter->resize(plotter, work.g_w, work.g_h); plotter->move(plotter, work.g_x, work.g_y ); - plotter->lock( plotter ); + if( plotter->lock( plotter ) == 0 ) + return; todo[0] = work.g_x; todo[1] = work.g_y; -- cgit v1.2.3