summaryrefslogtreecommitdiff
path: root/atari/plot/plotter_vdi.c
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2011-11-29 21:19:26 +0000
committerOle Loots <ole@monochrom.net>2011-11-29 21:19:26 +0000
commitd25f7cc27eff355f97913393c1c27b42a7ad01ae (patch)
tree2ed8b98f716671f1d5eab38c03b334a67f3e21f1 /atari/plot/plotter_vdi.c
parenta7af4ba0c1df2cc3a5a787a528eabd9ac50ff4df (diff)
downloadnetsurf-d25f7cc27eff355f97913393c1c27b42a7ad01ae.tar.gz
netsurf-d25f7cc27eff355f97913393c1c27b42a7ad01ae.tar.bz2
make use of non-blocking request for screen lock.
svn path=/trunk/netsurf/; revision=13202
Diffstat (limited to 'atari/plot/plotter_vdi.c')
-rwxr-xr-xatari/plot/plotter_vdi.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/atari/plot/plotter_vdi.c b/atari/plot/plotter_vdi.c
index 06b8f8f91..e79647408 100755
--- a/atari/plot/plotter_vdi.c
+++ b/atari/plot/plotter_vdi.c
@@ -49,7 +49,7 @@
static int dtor( GEM_PLOTTER self );
static int resize( GEM_PLOTTER self, int w, int h );
static int move( GEM_PLOTTER self, short x, short y );
-static void * lock( GEM_PLOTTER self );
+static int lock( GEM_PLOTTER self );
static int unlock( GEM_PLOTTER self );
static int update_region( GEM_PLOTTER self, GRECT region );
static int update_screen_region( GEM_PLOTTER self, GRECT region );
@@ -307,19 +307,25 @@ static int move( GEM_PLOTTER self,short x, short y )
}
-static void * lock( GEM_PLOTTER self )
+static int lock( GEM_PLOTTER self )
{
- LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));
+ LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));
+ if( (self->flags & PLOT_FLAG_LOCKED) != 0 )
+ return(1);
self->flags |= PLOT_FLAG_LOCKED;
- wind_update(BEG_UPDATE);
- wind_update(BEG_MCTRL);
+ if( !wind_update(BEG_UPDATE|0x100) )
+ return(0);
+ if( !wind_update(BEG_MCTRL|0x100) )
+ return(0);
graf_mouse(M_OFF, NULL);
- return( NULL );
+ return( 1 );
}
static int unlock( GEM_PLOTTER self )
{
- LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));
+ LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));
+ if( (self->flags & PLOT_FLAG_LOCKED) == 0 )
+ return(1);
self->flags &= ~PLOT_FLAG_LOCKED;
wind_update(END_MCTRL);
wind_update(END_UPDATE);