Re: [AD] scroll_screen in X11 window mode

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 24 Oct 2001, Michael Bukin <M.A.Bukin@xxxxxxxxxx> wrote:
> 
> I don't know details of current interrupt handling (pthreads etc.).
> Does event processing wait in XLockDisplay?  If it does, then does
> XUnlockDisplay switch to the process waiting in XLockDisplay?  

Sorry, I don't understand the internals of X locking.

> If it
> does not, then maybe adding yield after XUnlockDisplay will help?

It appears to.  When I changed XUNLOCK to this it worked, but wasn't
as fast as the other hack (not surprisingly).  Maybe do both (although
scrolling to the current position repeatedly is very uncommon)?

--- aintunix.h	2001/08/09 12:01:15	1.12
+++ aintunix.h	2001/10/25 01:20:55
@@ -89,8 +89,10 @@
 
    #define XUNLOCK()				\
       if (_unix_bg_man->multi_threaded) {	\
-	 if (_xwin.display)			\
+	 if (_xwin.display) {			\
 	    XUnlockDisplay(_xwin.display);	\
+	    yield_timeslice();			\
+	 }					\
       } else {					\
 	 _xwin.lock_count--;			\
       }



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/