"event->button.state = newstate = newstate; " - is it supposed to be so ?
- From: Sergei Steshenko <sergstesh yahoo com>
- To: gtk-perl-list gnome org
- Subject: "event->button.state = newstate = newstate; " - is it supposed to be so ?
- Date: Wed, 22 Sep 2010 06:41:27 -0700 (PDT)
Hello,
while looking into 'Gtk2-1.222/xs/GdkEvent.xs' file I've noticed this:
126 static void
127 gtk2perl_gdk_event_set_state (GdkEvent * event,
128 GdkModifierType newstate)
129 {
130 if (event) {
131 switch (event->type) {
132 case GDK_MOTION_NOTIFY:
133 event->motion.state = newstate;
134 break;
135 case GDK_BUTTON_PRESS:
136 case GDK_2BUTTON_PRESS:
137 case GDK_3BUTTON_PRESS:
138 case GDK_BUTTON_RELEASE:
139 event->button.state = newstate = newstate;
140 break;
- please see line #139.
I'd rather write the line as
139 event->button.state = newstate;
, though probably the repetition of 'newstate' is harmless.
Anyway, is line #139 supposed to be this way ?
Thanks,
Sergei.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]