rem: setRowSelected(table, event->xbutton.y/table->rowHeight, True);
add: if (event->xbutton.button == Button1) { row = event->xbutton.y/table->rowHeight; if (row != table->clickedRow) { setRowSelected(table, table->clickedRow, False); setRowSelected(table, row, True); table->clickedRow = row; table->dragging = 1; } } break;  case MotionNotify: if (table->dragging && event->xmotion.y >= 0) { row = event->xmotion.y/table->rowHeight; if (table->clickedRow != row && row >= 0) { setRowSelected(table, table->clickedRow, False); setRowSelected(table, row, True); table->clickedRow = row; } } break;  case ButtonRelease: if (event->xbutton.button == Button1) { if (table->action) (*table->action)(table, table->clientData); WMPostNotificationName(WMTableViewSelectionDidChangeNotification, table, NULL); table->dragging = 0; }
context: static void handleTableEvents(XEvent *event, void *data){    WMTableView *table = (WMTableView*)data;        switch (event->type) {     case ButtonPress:	setRowSelected(table, event->xbutton.y/table->rowHeight, True);	break;     case Expose:	repaintTable(table, event->xexpose.x, event->xexpose.y,		     event->xexpose.width, event->xexpose.height);	break;    }    }