Re: [AD] XIM patch for Allegro 4.1.x |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Elias Pschernig wrote:
After finally realizing that two displays won't easily work with Allegro, I just took the simple approach of using a pthreads lock instead of XLock. Why didn't anyone tell me earlier? :) The patch now does two things. First, it replaces X locking with pthreads locking. Second, it adds a new keyboard driver, which works thesame as the one in new_api_branch - just it has support for XIM.
Cool! I will test it out some more later, but I saw a problem in exkeys: modifier keys should not stuff characters into the readkey() buffer.
I also had to fix a small bug in xdga2.c where the mode fetching called X11 functions without proper locking.
You can probably commit this part right now.
And vsync would deadlock with the pthreads locking: The timer wants to draw the mouse, so waits for the mutex of vsync (called by e.g. set_palette). But vsync waits for the timer value to change :P Not sure why it caused no problems with X locking.
We need a solution for this. I think the vsync-emulation could run off the bgman thread instead of the timer thread. This will also deal with the problem of the vsync-emulation not working if the timer subsystem is not installed.
Peter
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |