By popular request.

When ticked, Minimize button minimizes to the taskbar (as usual) and Close, the (x), minimizes to the systray.

When unticked, Minimize minimizes to the systray and Close exits the app.

Trivial in retrospect, but took me ages to realize that behavior of Close and Minimize can be controlled with just one setting.