Fixed a use-before-initialize bug in unix/area.c. This was present from the start, and was an error in my Go code conversion; oops. Fixes #472.
This commit is contained in:
parent
17486fd175
commit
1b05846892
|
@ -248,6 +248,9 @@ static gboolean areaWidget_button_press_event(GtkWidget *w, GdkEventButton *e)
|
||||||
// clicking doesn't automatically transfer keyboard focus; we must do so manually (thanks tristan in irc.gimp.net/#gtk+)
|
// clicking doesn't automatically transfer keyboard focus; we must do so manually (thanks tristan in irc.gimp.net/#gtk+)
|
||||||
gtk_widget_grab_focus(w);
|
gtk_widget_grab_focus(w);
|
||||||
|
|
||||||
|
me.Down = e->button;
|
||||||
|
me.Up = 0;
|
||||||
|
|
||||||
// we handle multiple clicks ourselves here, in the same way as we do on Windows
|
// we handle multiple clicks ourselves here, in the same way as we do on Windows
|
||||||
if (e->type != GDK_BUTTON_PRESS)
|
if (e->type != GDK_BUTTON_PRESS)
|
||||||
// ignore GDK's generated double-clicks and beyond
|
// ignore GDK's generated double-clicks and beyond
|
||||||
|
@ -266,9 +269,6 @@ static gboolean areaWidget_button_press_event(GtkWidget *w, GdkEventButton *e)
|
||||||
e->time, maxTime,
|
e->time, maxTime,
|
||||||
maxDistance, maxDistance);
|
maxDistance, maxDistance);
|
||||||
|
|
||||||
me.Down = e->button;
|
|
||||||
me.Up = 0;
|
|
||||||
|
|
||||||
// and set things up for window drags
|
// and set things up for window drags
|
||||||
a->dragevent = e;
|
a->dragevent = e;
|
||||||
finishMouseEvent(a, &me, e->button, e->x, e->y, e->state, e->window);
|
finishMouseEvent(a, &me, e->button, e->x, e->y, e->state, e->window);
|
||||||
|
|
Loading…
Reference in New Issue