Improve dock widget show/hide