Re: GGAD pseudo-error?
- From: Federico Mena Quintero <federico helixcode com>
- To: acampos ceronet com
- CC: gtk-list redhat com, gnome-devel-list gnome org
- Subject: Re: GGAD pseudo-error?
- Date: Sun, 27 Feb 2000 23:10:45 -0500
>  On chapter 10,  inside 10.5.4
>  the line that says:
>  
>  if ( (state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK )
>  
>  shouldn't just be?:
>  
>  if ( state & GDK_SHIFT_MASK )
The usual idiom for testing modifier keys is just that.  The reason
for this is that you want
	(state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK))
to be exactly (GDK_SHIFT_MASK | GDK_CONTROL_MASK), otherwise it would
also trigger when you just have just one of those modifiers pressed.
  Federico
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]