public boolean mouseup(Coord c, int button) {
        Slot h = bhit(c);
        if (button == 1) {
            if (dragging != null) {
                ui.dropthing(ui.root, ui.mc, dragging.getres());
                dragging = pressed = null;
            } else if (pressed != null) {
                if (pressed == h)
                    h.use();
                pressed = null;
            }
            ui.grabmouse(null);
        }
        if (dm) {
            Config.setWindowOpt(name + "_pos", this.c.toString());
        }
        super.mouseup(c, button);

        return (true);
    }