2019-09-03 19:11:14 -07:00
|
|
|
#include "window-dock-browser.hpp"
|
|
|
|
#include <QCloseEvent>
|
|
|
|
|
|
|
|
void BrowserDock::closeEvent(QCloseEvent *event)
|
|
|
|
{
|
|
|
|
OBSDock::closeEvent(event);
|
|
|
|
|
|
|
|
if (!event->isAccepted()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int panel_version = -1;
|
|
|
|
if (panel_version == -1) {
|
|
|
|
panel_version = obs_browser_qcef_version();
|
|
|
|
}
|
|
|
|
|
2019-09-19 05:39:12 -07:00
|
|
|
if (panel_version >= 2 && !!cefWidget) {
|
2019-09-03 19:11:14 -07:00
|
|
|
cefWidget->closeBrowser();
|
|
|
|
}
|
|
|
|
}
|