diff options
author | David Robillard <d@drobilla.net> | 2015-09-17 16:18:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-09-17 16:18:42 +0000 |
commit | 501ac1f05f0b6ce3bceaa49775f83ebc8955e077 (patch) | |
tree | 792dafed47582e98a56dc2582fe1bb14946eccfc /src/x11_in_qt4.cpp | |
parent | ca1c65094684479ca756ba9351681f2e23d7afb7 (diff) | |
download | suil-501ac1f05f0b6ce3bceaa49775f83ebc8955e077.tar.gz suil-501ac1f05f0b6ce3bceaa49775f83ebc8955e077.tar.bz2 suil-501ac1f05f0b6ce3bceaa49775f83ebc8955e077.zip |
Fix issues with embedding in Qt.
Patch from Rui Nuno Capela.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5732 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/x11_in_qt4.cpp')
-rw-r--r-- | src/x11_in_qt4.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/x11_in_qt4.cpp b/src/x11_in_qt4.cpp index dd96300..107a4bd 100644 --- a/src/x11_in_qt4.cpp +++ b/src/x11_in_qt4.cpp @@ -41,6 +41,7 @@ public: , _ui_timer(0) {} +protected: void showEvent(QShowEvent* event) { if (_idle_iface && _ui_timer == 0) { _ui_timer = this->startTimer(30); @@ -57,6 +58,15 @@ public: QX11EmbedContainer::timerEvent(event); } + void closeEvent(QCloseEvent* event) { + if (_ui_timer && _idle_iface) { + this->killTimer(_ui_timer); + _ui_timer = 0; + } + QX11EmbedContainer::closeEvent(event); + } + +private: SuilInstance* const _instance; const LV2UI_Idle_Interface* const _idle_iface; QX11EmbedWidget* const _widget; |