summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/VideoInterface/RenderWidget.cpp
blob: 5162d2b230244f6cfa6e7f47e11ef67cbcda9346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2014 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#include <QCloseEvent>
#include <QMessageBox>

#include "DolphinQt/MainWindow.h"
#include "DolphinQt/VideoInterface/RenderWidget.h"

DRenderWidget::DRenderWidget(QWidget* parent_widget)
	: QWidget(parent_widget)
{
	setAttribute(Qt::WA_NativeWindow, true);
	setAttribute(Qt::WA_OpaquePaintEvent, true);
	setAttribute(Qt::WA_NoSystemBackground, true);
}

void DRenderWidget::closeEvent(QCloseEvent* e)
{
	if (!g_main_window->OnStop())
	{
		e->ignore();
		return;
	}
	QWidget::closeEvent(e);
}