public boolean mousedown(Coord c, int button) {
        if (folded) {
            //recalcSize(this.sz);
            return super.mousedown(c, button);
        }
        parent.setfocus(this);
        raise();
        Resource h = bhit(c);
        if (button == 1) {
            if (h != null) {
                pressed = h;
                ui.grabmouse(this);
                return true;
            } else {
                ui.grabmouse(this);
                doff = c;
                if (c.isect(sz.sub(gzsz), gzsz)) {
                    rsm = true;
                    return true;
                }
            }
        } else if ((button == 3) && (h != null)) {
            right_click_pressed = h;
            return true;
        }
        return super.mousedown(c, button);
    }