|
|
@@ -21,6 +21,7 @@
|
|
|
#include "qt-wrappers.hpp"
|
|
|
#include "display-helpers.hpp"
|
|
|
|
|
|
+#include <QCloseEvent>
|
|
|
#include <QScreen>
|
|
|
#include <QWindow>
|
|
|
|
|
|
@@ -109,6 +110,18 @@ void OBSBasicProperties::timerEvent(QTimerEvent *event)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void OBSBasicProperties::closeEvent(QCloseEvent *event)
|
|
|
+{
|
|
|
+ QDialog::closeEvent(event);
|
|
|
+ if (!event->isAccepted())
|
|
|
+ return;
|
|
|
+
|
|
|
+ // remove draw callback in case our drawable surfaces go away before
|
|
|
+ // the destructor gets called
|
|
|
+ obs_display_remove_draw_callback(display,
|
|
|
+ OBSBasicProperties::DrawPreview, this);
|
|
|
+}
|
|
|
+
|
|
|
void OBSBasicProperties::Init()
|
|
|
{
|
|
|
gs_init_data init_data = {};
|