]> git.sesse.net Git - kdenlive/commitdiff
Stop active monitor on mainwindow minimize. This fixes issue 231: http://www.kdenliv...
authorMads Bondo Dydensborg <mads@dydensborg.dk>
Fri, 24 Oct 2008 11:44:05 +0000 (11:44 +0000)
committerMads Bondo Dydensborg <mads@dydensborg.dk>
Fri, 24 Oct 2008 11:44:05 +0000 (11:44 +0000)
svn path=/branches/KDE4/; revision=2549

src/mainwindow.cpp
src/mainwindow.h

index e7d04b83387d82fc1730d920208f5fa82d004377..896556138bc42d190029498a20c85d651b8097dc 100644 (file)
@@ -1706,6 +1706,17 @@ void MainWindow::keyPressEvent(QKeyEvent *ke) {
     } 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 477c155663a1741befe1ac2716d44e077068c416..dad33684f8d98bd7ebe2fb1dad64241489c49dc7 100644 (file)
@@ -74,6 +74,8 @@ protected:
     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