[Kdenlive-devel] Patch for issue 231 - OK to commit?
Mads Bondo Dydensborg
mads at dydensborg.dk
Thu Oct 23 21:09:45 UTC 2008
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
More information about the Kdenlive
mailing list