提交 1eba0827 编写于 作者: C Clayton Groeneveld

UI: Fix projector not working on secondary monitors

This fixes a bug where the projector wouldn't work on secondary
monitors on Windows.
上级 aef10d46
...@@ -24,10 +24,13 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor, ...@@ -24,10 +24,13 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor,
removedSignal(obs_source_get_signal_handler(source), "remove", removedSignal(obs_source_get_signal_handler(source), "remove",
OBSSourceRemoved, this) OBSSourceRemoved, this)
{ {
type = type_; isAlwaysOnTop = config_get_bool(GetGlobalConfig(), "BasicWindow",
"ProjectorAlwaysOnTop");
SetAlwaysOnTop(this, config_get_bool(GetGlobalConfig(), "BasicWindow", if (isAlwaysOnTop)
"ProjectorAlwaysOnTop")); setWindowFlags(Qt::WindowStaysOnTopHint);
type = type_;
setWindowIcon(QIcon::fromTheme("obs", QIcon(":/res/images/obs.png"))); setWindowIcon(QIcon::fromTheme("obs", QIcon(":/res/images/obs.png")));
...@@ -43,10 +46,6 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor, ...@@ -43,10 +46,6 @@ OBSProjector::OBSProjector(QWidget *widget, obs_source_t *source_, int monitor,
addAction(action); addAction(action);
connect(action, SIGNAL(triggered()), this, SLOT(EscapeTriggered())); connect(action, SIGNAL(triggered()), this, SLOT(EscapeTriggered()));
isAlwaysOnTop = config_get_bool(GetGlobalConfig(), "BasicWindow",
"ProjectorAlwaysOnTop");
SetAlwaysOnTop(this, isAlwaysOnTop);
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
//disable application quit when last window closed //disable application quit when last window closed
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册