inst->input_event_time = event->time;
gint motion_event(GtkWidget *widget, GdkEventMotion *event, gpointer data){    struct gui_data *inst = (struct gui_data *)data;    int shift, ctrl, alt, x, y, button;    show_mouseptr(inst, 1);    shift = event->state & GDK_SHIFT_MASK;    ctrl = event->state & GDK_CONTROL_MASK;    alt = event->state & GDK_MOD1_MASK;    if (event->state & GDK_BUTTON1_MASK)	button = MBT_LEFT;    else if (event->state & GDK_BUTTON2_MASK)	button = MBT_MIDDLE;    else if (event->state & GDK_BUTTON3_MASK)	button = MBT_RIGHT;    else	return FALSE;		       /* don't even know what button! */    x = (event->x - inst->cfg.window_border) / inst->font_width;    y = (event->y - inst->cfg.window_border) / inst->font_height;    term_mouse(inst->term, button, translate_button(button), MA_DRAG,	       x, y, shift, ctrl, alt);    return TRUE;}