summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/PopupWindow.cpp8
-rw-r--r--src/core/PopupWindow.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/core/PopupWindow.cpp b/src/core/PopupWindow.cpp
index 6c2c61d..1146033 100644
--- a/src/core/PopupWindow.cpp
+++ b/src/core/PopupWindow.cpp
@@ -19,7 +19,7 @@
#include <QtCore/QTimer>
PopupWindow::PopupWindow(QWindow* parent)
- : QQuickCanvas(parent)
+ : QQuickWindow(parent)
{
setWindowFlags(Qt::Popup);
QSurfaceFormat surfaceFormat;
@@ -31,7 +31,7 @@ PopupWindow::PopupWindow(QWindow* parent)
void PopupWindow::showEvent(QShowEvent* ev)
{
- QQuickCanvas::showEvent(ev);
+ QQuickWindow::showEvent(ev);
// In XCB, we are only guaranteed to grab the mouse if there's a platformWindow
// created. This happens right after this event is sent.
QTimer::singleShot(0, this, SLOT(setMouseGrab()));
@@ -39,13 +39,13 @@ void PopupWindow::showEvent(QShowEvent* ev)
void PopupWindow::hideEvent(QHideEvent* ev)
{
- QQuickCanvas::hideEvent(ev);
+ QQuickWindow::hideEvent(ev);
setMouseGrabEnabled(false);
}
void PopupWindow::mousePressEvent(QMouseEvent* ev)
{
- QQuickCanvas::mousePressEvent(ev);
+ QQuickWindow::mousePressEvent(ev);
const bool outsideWindow = ev->x() < 0 || ev->x() > width() || ev->y() < 0 || ev->y() > height();
if (outsideWindow)
hide();
diff --git a/src/core/PopupWindow.h b/src/core/PopupWindow.h
index 189adb3..8b44ccf 100644
--- a/src/core/PopupWindow.h
+++ b/src/core/PopupWindow.h
@@ -17,9 +17,9 @@
#ifndef PopupWindow_h
#define PopupWindow_h
-#include <QtQuick/QQuickCanvas>
+#include <QtQuick/QQuickWindow>
-class PopupWindow : public QQuickCanvas {
+class PopupWindow : public QQuickWindow {
Q_OBJECT
public: