Make the video display actually hide when the detached video dialog is minimized.

Originally committed to SVN as r3706.
This commit is contained in:
Thomas Goyne 2009-10-13 04:10:55 +00:00
parent ddc3b57694
commit 389f296b4d
2 changed files with 13 additions and 0 deletions

View File

@ -110,6 +110,7 @@ DialogDetachedVideo::~DialogDetachedVideo() {
BEGIN_EVENT_TABLE(DialogDetachedVideo,wxDialog)
EVT_CLOSE(DialogDetachedVideo::OnClose)
EVT_MOVE(DialogDetachedVideo::OnMove)
EVT_ICONIZE(DialogDetachedVideo::OnMinimize)
END_EVENT_TABLE()
/// @brief Close window
@ -129,3 +130,14 @@ void DialogDetachedVideo::OnMove(wxMoveEvent &event) {
Options.SetInt(_T("Detached video last x"),pos.x);
Options.SetInt(_T("Detached video last y"),pos.y);
}
/// @brief Minimize event handler
/// @param event
void DialogDetachedVideo::OnMinimize(wxIconizeEvent &event) {
if (event.IsIconized()) {
// Force the video display to repaint as otherwise the last displayed
// frame stays visible even though the dialog is minimized
Hide();
Show();
}
}

View File

@ -58,6 +58,7 @@ private:
void OnClose(wxCloseEvent &event);
void OnMove(wxMoveEvent &event);
void OnMinimize(wxIconizeEvent &event);
public:
DialogDetachedVideo(FrameMain *parent, const wxSize &initialDisplaySize);