diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-01-29 14:03:41 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-03-16 17:17:02 +0000 |
commit | abe3217bac18fe8a99cbb2f494a5e4cf6c6d70ce (patch) | |
tree | 85cc0eb4dfd940ea445be6cabce655498b28b82e /src/gui/kernel/qshapedpixmapdndwindow_p.h | |
parent | d3744eff8600a8d1bcc97db6737c7f4f46316312 (diff) |
Reimplement QShapedPixmapWindow using QRasterWindow.
The current implementation makes the window too big when
a QPixmap with a DPR != 1 is set. Circumvent the problem
by using a QRasterWindow.
Task-number: QTBUG-46068
Task-number: QTBUG-50938
Change-Id: I0fca91f571937250c740f1400bd60286330fb595
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qshapedpixmapdndwindow_p.h')
-rw-r--r-- | src/gui/kernel/qshapedpixmapdndwindow_p.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/kernel/qshapedpixmapdndwindow_p.h b/src/gui/kernel/qshapedpixmapdndwindow_p.h index 3d7974fa82..f2d678c1b4 100644 --- a/src/gui/kernel/qshapedpixmapdndwindow_p.h +++ b/src/gui/kernel/qshapedpixmapdndwindow_p.h @@ -45,21 +45,18 @@ // We mean it. // -#include <QtGui/QWindow> +#include <QtGui/QRasterWindow> #include <QtGui/QPixmap> -#include <QtGui/QBackingStore> QT_BEGIN_NAMESPACE -class QShapedPixmapWindow : public QWindow +class QShapedPixmapWindow : public QRasterWindow { Q_OBJECT public: explicit QShapedPixmapWindow(QScreen *screen = 0); ~QShapedPixmapWindow(); - void render(); - void setUseCompositing(bool on) { m_useCompositing = on; } void setPixmap(const QPixmap &pixmap); void setHotspot(const QPoint &hotspot); @@ -67,10 +64,9 @@ public: void updateGeometry(const QPoint &pos); protected: - void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE; private: - QBackingStore *m_backingStore; QPixmap m_pixmap; QPoint m_hotSpot; bool m_useCompositing; |