Re: Getting keyboard state.
- From: "Timothy M. Shead" <tshead k-3d com>
- To: Havoc Pennington <hp redhat com>
- Cc: Philip Kendall <pak ast cam ac uk>, GTK+ faq <gtk-app-devel-list redhat com>
- Subject: Re: Getting keyboard state.
- Date: Fri, 12 Jan 2001 15:28:41 -0800
Havoc Pennington wrote:
"Timothy M. Shead" <tshead k-3d com> writes:
Rather than creating handlers and maintaining state for this, you can get the
information along with the pointer position from anywhere in your code:
int x, y;
GdkModifierType modifiers;
gdk_window_get_pointer(window, &x, &y, &modifiers);
... the modifier keys will be OR-ed together GdkModifierType values.
Maintaining the state is much more correct, the get_pointer() solution
is a giant race condition.
Havoc
Come again? Are you referring to the round-trip to the X server?
Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]