Just found that this problem is related to the operating system/desktop environment. I am using xfce, and when I minimize to tray, both mainwindow and dialog are hided.
On IceWM, only mainwindow is hided, and dialog is still shown.
On Gnome, seems that it doesn't have system tray.
On windows, both dialog and mainwindow are not hided, and tray icon is not shown (nothing happens at all).
Bookmarks