On Thu, Oct 23, 2008 at 6:09 PM, Mads Bondo Dydensborg <mads at dydensborg.dk> wrote: > Hi > > Below a very basic patch for issue 231: > http://www.kdenlive.org/mantis/view.php?id=231 > > Two questions > > - do you want playback to stop on minimize? > - patch OK to commit? > > Regards > > Mads > > Index: src/mainwindow.cpp > =================================================================== > --- src/mainwindow.cpp (revision 2547) > +++ src/mainwindow.cpp (working copy) > @@ -1706,6 +1706,17 @@ > } else KXmlGuiWindow::keyPressEvent(ke); > } > > + > +/** Gets called when the window gets hidden */ > +void MainWindow::hideEvent(QHideEvent *event) { > + // kDebug() << "I was hidden"; > + // issue http://www.kdenlive.org/mantis/view.php?id=231 > + if ( this->isMinimized() ) { > + // kDebug() << "I am minimized"; > + if ( m_monitorManager ) m_monitorManager->stopActiveMonitor(); > + } > +} > + > bool MainWindow::eventFilter(QObject *obj, QEvent *event) { > if (m_findActivated) { > if (event->type() == QEvent::ShortcutOverride) { > Index: src/mainwindow.h > =================================================================== > --- src/mainwindow.h (revision 2547) > +++ src/mainwindow.h (working copy) > @@ -74,6 +74,8 @@ > virtual bool queryClose(); > virtual void customEvent(QEvent * e); > virtual void keyPressEvent(QKeyEvent *ke); > + /** Override hideEvent to get events when the mainwindow gets hidden */ > + virtual void hideEvent(QHideEvent *e); > bool eventFilter(QObject *obj, QEvent *ev); > /** > * This function is called when it is time for the app to save its > > Regards > > Mads > -- > Mads Bondo Dydensborg mads at dydensborg.dk http://www.madsdydensborg.dk/ > > I don't say this lightly. However, I really think that the U.S. no longer > is classifiable as a democracy, but rather as a plutocracy. > - H. Peter Anvin > > -------------------------------------------------------------------------
Maybe would be better to make that optional, with a Preferences setting? Regards, -- ----------------------------------------------------------------- "Your mind is like a parachute: it works better when open." L?cio Fl?vio Corr?a (+55) (87) 9118-8115 lucio.correa #at# gmail.com luciocorrea.wordpress.com
