Re: signal/events
- From: Bruce Ide <bruce ide echostar com>
- To: Jacob Gladish <gladish wolf sneakerlabs com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: signal/events
- Date: Thu, 21 Sep 2000 07:46:24 -0600
"Jacob" == Jacob Gladish <gladish wolf sneakerlabs com> writes:
Jacob> Im having a problem with a signal handler attatched to an
Jacob> arrow key and the callback takes a fairly long time to
Jacob> finish and return. what is happening is when the user holds
Jacob> the key down, the events get queued up and keep processing
Jacob> after the key is released. Im familiary with gui
Jacob> programming in java where there is a property for a timer
Jacob> object called coalesce which throws out events that come
Jacob> into the queue if one of the same is currently being
Jacob> processed which eliminates this. my question is, can I do
Jacob> something similar so that once the user "unholds" the arrow
Jacob> key, the queue is empty, because of this property?
One thing you could do is process the key_up_event rather than the
key_press_event. That still doesn't help if the user presses the key a
bunch of times.
Any chance of forking or cloning, returning immediately and doing the
work the button triggers in the background? Of course, you have to be
careful what you do at the GUI level in a thread.
Maybe there's some way to disable the signal when you enter the
handler and re-enable it when you exit it? This would actually be way
useful functionality hmm. I'll have to see if it's possible to do
this...
--
Bruce Ide bruce ide echostar com
http://www.paratheoanametamystikhood.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]