|
@@ -9930,11 +9930,25 @@ void OBSBasic::on_customContextMenuRequested(const QPoint &pos)
|
|
|
{
|
|
|
QWidget *widget = childAt(pos);
|
|
|
const char *className = nullptr;
|
|
|
- if (widget != nullptr)
|
|
|
+ QString objName;
|
|
|
+ if (widget != nullptr) {
|
|
|
className = widget->metaObject()->className();
|
|
|
-
|
|
|
- if (!className || strstr(className, "Dock") != nullptr)
|
|
|
- ui->menuDocks->exec(mapToGlobal(pos));
|
|
|
+ objName = widget->objectName();
|
|
|
+ }
|
|
|
+
|
|
|
+ QPoint globalPos = mapToGlobal(pos);
|
|
|
+ if (className && strstr(className, "Dock") != nullptr &&
|
|
|
+ !objName.isEmpty()) {
|
|
|
+ if (objName.compare("scenesDock") == 0) {
|
|
|
+ ui->scenes->customContextMenuRequested(globalPos);
|
|
|
+ } else if (objName.compare("sourcesDock") == 0) {
|
|
|
+ ui->sources->customContextMenuRequested(globalPos);
|
|
|
+ } else if (objName.compare("mixerDock") == 0) {
|
|
|
+ StackedMixerAreaContextMenuRequested();
|
|
|
+ }
|
|
|
+ } else if (!className) {
|
|
|
+ ui->menuDocks->exec(globalPos);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void OBSBasic::UpdateProjectorHideCursor()
|