mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-18 19:24:42 -04:00
UI: Call setWindowFlags before setupUi
For some reason this has a noticeable performance improvement, presumably because Qt is notifying all the child widgets?
This commit is contained in:
@@ -44,6 +44,10 @@ OBSBasicInteraction::OBSBasicInteraction(QWidget *parent, OBSSource source_)
|
||||
int cy = (int)config_get_int(App()->GlobalConfig(), "InteractionWindow",
|
||||
"cy");
|
||||
|
||||
Qt::WindowFlags flags = windowFlags();
|
||||
Qt::WindowFlags helpFlag = Qt::WindowContextHelpButtonHint;
|
||||
setWindowFlags(flags & (~helpFlag));
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->preview->setMouseTracking(true);
|
||||
@@ -59,10 +63,6 @@ OBSBasicInteraction::OBSBasicInteraction(QWidget *parent, OBSSource source_)
|
||||
const char *name = obs_source_get_name(source);
|
||||
setWindowTitle(QTStr("Basic.InteractionWindow").arg(QT_UTF8(name)));
|
||||
|
||||
Qt::WindowFlags flags = windowFlags();
|
||||
Qt::WindowFlags helpFlag = Qt::WindowContextHelpButtonHint;
|
||||
setWindowFlags(flags & (~helpFlag));
|
||||
|
||||
auto addDrawCallback = [this]() {
|
||||
obs_display_add_draw_callback(ui->preview->GetDisplay(),
|
||||
OBSBasicInteraction::DrawPreview,
|
||||
|
||||
Reference in New Issue
Block a user