qt: Restore Close button on monitor windows
This commit is contained in:
@@ -583,7 +583,7 @@ void MainWindow::initRendererMonitorSlot(int monitor_index)
|
||||
{
|
||||
this->renderers[monitor_index]->show();
|
||||
});
|
||||
secondaryRenderer->setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint);
|
||||
secondaryRenderer->setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
|
||||
secondaryRenderer->setWindowTitle(QObject::tr("86Box Monitor #") + QString::number(monitor_index + 1));
|
||||
|
||||
if (vid_resize == 2) {
|
||||
|
@@ -443,3 +443,10 @@ RendererStack::blitCommon(int x, int y, int w, int h)
|
||||
emit blitToRenderer(currentBuf, sx, sy, sw, sh);
|
||||
currentBuf = (currentBuf + 1) % imagebufs.size();
|
||||
}
|
||||
|
||||
void RendererStack::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
event->ignore();
|
||||
main_window->close();
|
||||
}
|
||||
|
||||
|
@@ -31,6 +31,7 @@ public:
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
void leaveEvent(QEvent *event) override;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override
|
||||
{
|
||||
event->ignore();
|
||||
|
Reference in New Issue
Block a user