summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication.cpp2
-rw-r--r--src/gui/kernel/qdnd_x11.cpp4
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp13
3 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 3715059..832d829 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -3002,7 +3002,7 @@ void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
qt_button_down = 0;
// Send enter/leave events followed by a mouse move on the entered widget.
- QMouseEvent e(QEvent::MouseMove, pos, globalPos, Qt::NoButton, mouse_buttons, modifier_buttons);
+ QMouseEvent e(QEvent::MouseMove, pos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver);
#endif // QT_NO_CURSOR
}
diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp
index d1ef810..d5a6095 100644
--- a/src/gui/kernel/qdnd_x11.cpp
+++ b/src/gui/kernel/qdnd_x11.cpp
@@ -506,6 +506,7 @@ bool QX11Data::xdndMimeDataForAtom(Atom a, QMimeData *mimeData, QByteArray *data
*atomFormat = textprop.encoding;
*dataFormat = textprop.format;
*data = QByteArray((const char *) textprop.value, textprop.nitems * textprop.format / 8);
+ ret = true;
DEBUG(" textprop type %lx\n"
" textprop name '%s'\n"
@@ -541,10 +542,11 @@ bool QX11Data::xdndMimeDataForAtom(Atom a, QMimeData *mimeData, QByteArray *data
dm->xdndMimeTransferedPixmap[dm->xdndMimeTransferedPixmapIndex] = pm;
dm->xdndMimeTransferedPixmapIndex =
(dm->xdndMimeTransferedPixmapIndex + 1) % 2;
+ ret = true;
}
}
}
- return data;
+ return ret && data != 0;
}
//$$$
diff --git a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp
index 3698afd..afee77e 100644
--- a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglwindowsurface.cpp
@@ -157,18 +157,21 @@ QImage PvrEglWindowSurface::image() const
void *data = pvrQwsGetRenderBuffer(drawable);
if (data) {
return QImage((uchar *)data, pvrRect.width, pvrRect.height,
- pvrQwsGetStride(drawable), QImage::Format_RGB16);
+ pvrQwsGetStride(drawable), screen->pixelFormat());
}
}
- return QImage();
+ return QImage(16, 16, screen->pixelFormat());
}
QPaintDevice *PvrEglWindowSurface::paintDevice()
{
- // Return a dummy paint device because the widget itself
- // cannot be painted to this way.
+ QGLWidget *glWidget = qobject_cast<QGLWidget *>(window());
+ if (glWidget)
+ return glWidget;
+
+ // Should be a QGLWidget, but if not return a dummy paint device.
if (!pdevice)
- pdevice = new QImage(50, 50, QImage::Format_RGB16);
+ pdevice = new QImage(50, 50, screen->pixelFormat());
return pdevice;
}