attach extension to opera/vivaldi or all windows

This commit is contained in:
fourtf
2019-10-07 20:23:28 +02:00
parent 2fc799f85a
commit f25e52b218
3 changed files with 22 additions and 8 deletions
+12 -6
View File
@@ -180,13 +180,19 @@ void AttachedWindow::attachToHwnd(void *_attachedPtr)
QString qfilename =
QString::fromWCharArray(filename.get(), int(filenameLength));
if (!qfilename.endsWith("chrome.exe") &&
!qfilename.endsWith("firefox.exe"))
if (!getSettings()->attachExtensionToAnyProcess)
{
qDebug() << "NM Illegal caller" << qfilename;
this->timer_.stop();
this->deleteLater();
return;
// We don't attach to non-browser processes by default.
if (!qfilename.endsWith("chrome.exe") &&
!qfilename.endsWith("firefox.exe") &&
!qfilename.endsWith("vivaldi.exe") &&
!qfilename.endsWith("opera.exe"))
{
qDebug() << "NM Illegal caller" << qfilename;
this->timer_.stop();
this->deleteLater();
return;
}
}
this->validProcessName_ = true;
}