Qt/RenderWidget: Remove fill background functionality
We no longer need this since the video backend handles clearing the window, and it fixes MoltenVK with Qt 5.14.
This commit is contained in:
parent
2f016295a6
commit
cdb0aa850d
|
@ -58,9 +58,6 @@ RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
|
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
|
||||||
// Stop filling the background once emulation starts, but fill it until then (Bug 10958)
|
|
||||||
SetFillBackground(Config::Get(Config::MAIN_RENDER_TO_MAIN) &&
|
|
||||||
state == Core::State::Uninitialized);
|
|
||||||
if (state == Core::State::Running)
|
if (state == Core::State::Running)
|
||||||
SetImGuiKeyMap();
|
SetImGuiKeyMap();
|
||||||
});
|
});
|
||||||
|
@ -91,21 +88,12 @@ RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
||||||
|
|
||||||
// We need a native window to render into.
|
// We need a native window to render into.
|
||||||
setAttribute(Qt::WA_NativeWindow);
|
setAttribute(Qt::WA_NativeWindow);
|
||||||
|
setAttribute(Qt::WA_PaintOnScreen);
|
||||||
SetFillBackground(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RenderWidget::SetFillBackground(bool fill)
|
|
||||||
{
|
|
||||||
setAutoFillBackground(fill);
|
|
||||||
setAttribute(Qt::WA_OpaquePaintEvent, !fill);
|
|
||||||
setAttribute(Qt::WA_NoSystemBackground, !fill);
|
|
||||||
setAttribute(Qt::WA_PaintOnScreen, !fill);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QPaintEngine* RenderWidget::paintEngine() const
|
QPaintEngine* RenderWidget::paintEngine() const
|
||||||
{
|
{
|
||||||
return autoFillBackground() ? QWidget::paintEngine() : nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderWidget::dragEnterEvent(QDragEnterEvent* event)
|
void RenderWidget::dragEnterEvent(QDragEnterEvent* event)
|
||||||
|
@ -178,8 +166,6 @@ bool RenderWidget::event(QEvent* event)
|
||||||
|
|
||||||
switch (event->type())
|
switch (event->type())
|
||||||
{
|
{
|
||||||
case QEvent::Paint:
|
|
||||||
return !autoFillBackground();
|
|
||||||
case QEvent::KeyPress:
|
case QEvent::KeyPress:
|
||||||
{
|
{
|
||||||
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
|
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
|
||||||
|
|
|
@ -33,7 +33,6 @@ private:
|
||||||
void HandleCursorTimer();
|
void HandleCursorTimer();
|
||||||
void OnHideCursorChanged();
|
void OnHideCursorChanged();
|
||||||
void OnKeepOnTopChanged(bool top);
|
void OnKeepOnTopChanged(bool top);
|
||||||
void SetFillBackground(bool fill);
|
|
||||||
void OnFreeLookMouseMove(QMouseEvent* event);
|
void OnFreeLookMouseMove(QMouseEvent* event);
|
||||||
void PassEventToImGui(const QEvent* event);
|
void PassEventToImGui(const QEvent* event);
|
||||||
void SetImGuiKeyMap();
|
void SetImGuiKeyMap();
|
||||||
|
|
Loading…
Reference in New Issue