mirror of https://github.com/odrling/Aegisub
Make the video display actually hide when the detached video dialog is minimized.
Originally committed to SVN as r3706.
This commit is contained in:
parent
ddc3b57694
commit
389f296b4d
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ private:
|
|||
|
||||
void OnClose(wxCloseEvent &event);
|
||||
void OnMove(wxMoveEvent &event);
|
||||
void OnMinimize(wxIconizeEvent &event);
|
||||
|
||||
public:
|
||||
DialogDetachedVideo(FrameMain *parent, const wxSize &initialDisplaySize);
|
||||
|
|
Loading…
Reference in New Issue