Re: [AD] X11 unresponsiveness |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Evert Glebbeek wrote:
I agree that 2 would be the best method. To be clear on this, for the
multi-threaded version of the library, we can get away with simply
removing the offending line, right?
Right. Elias told me he sent a patch, though encouraged me to send in
mine as well. I don't have the signals version of Allegro compiled so I
can't test this, but should this work? Made against the CVS version I
downloaded not too long ago.
- Kitty Cat
--- xwin.c 2004-07-11 03:33:10.000000000 -0700
+++ xwin.c 2004-07-12 16:30:14.000000000 -0700
@@ -2434,14 +2434,24 @@
void _xwin_handle_input(void)
{
+#ifndef ALLEGRO_MULTITHREADED
+ static volatile int input_throttle = 0;
+ ++input_throttle;
+
if (_xwin.lock_count) return;
+#endif
XLOCK();
- if (_xwin_input_handler)
- _xwin_input_handler();
- else
- _xwin_private_handle_input();
+#ifndef ALLEGRO_MULTITHREADED
+ while(input_throttle--)
+#endif
+ {
+ if (_xwin_input_handler)
+ _xwin_input_handler();
+ else
+ _xwin_private_handle_input();
+ }
XUNLOCK();
}