Merge pull request #1457 from admshao/fix-projectors-always-on-top

UI: Use AlwaysOnTop option for windowed projectors
master
Jim 2018-08-29 09:08:59 -07:00 committed by GitHub
commit 86b7b0b6d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -36,6 +36,9 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor,
windowedProjectors.push_back(this);
resize(480, 270);
SetAlwaysOnTop(this, config_get_bool(GetGlobalConfig(),
"BasicWindow", "ProjectorAlwaysOnTop"));
} else {
setWindowFlags(Qt::FramelessWindowHint |
Qt::X11BypassWindowManagerHint);
@ -48,6 +51,8 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor,
addAction(action);
connect(action, SIGNAL(triggered()), this,
SLOT(EscapeTriggered()));
SetAlwaysOnTop(this, true);
}
setAttribute(Qt::WA_DeleteOnClose, true);
@ -68,11 +73,6 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor,
connect(this, &OBSQTDisplay::DisplayCreated, addDrawCallback);
bool alwaysOnTop = config_get_bool(GetGlobalConfig(), "BasicWindow",
"ProjectorAlwaysOnTop");
if (alwaysOnTop && !isWindow)
SetAlwaysOnTop(this, true);
bool hideCursor = config_get_bool(GetGlobalConfig(),
"BasicWindow", "HideProjectorCursor");
if (hideCursor && !isWindow) {