summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-09-03 21:10:25 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-09-04 16:11:45 (GMT)
commitad8f02a5a0ea11fa38e068a32470e1462e6b723c (patch)
tree8dd8efcba6f915e464015fb754d1d0addcb89a60
parenta2b83068ea3309c6371d028c5a1eeee42022f93e (diff)
downloadQt-ad8f02a5a0ea11fa38e068a32470e1462e6b723c.zip
Qt-ad8f02a5a0ea11fa38e068a32470e1462e6b723c.tar.gz
Qt-ad8f02a5a0ea11fa38e068a32470e1462e6b723c.tar.bz2
Handle proxywidgets better in DFB
This code is roughly the same as in other screen drivers. We shouldn't flush widgets that are in a graphicsscene as a proxy widget. They will be handled by the graphicsview. Reviewed-by: Donald Carr <donald.carr@nokia.com>
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp47
1 files changed, 26 insertions, 21 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index 61cfec51..e2b439e 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -43,6 +43,7 @@
#include "qdirectfbscreen.h"
#include "qdirectfbpaintengine.h"
+#include <private/qwidget_p.h>
#include <qwidget.h>
#include <qwindowsystem_qws.h>
#include <qpaintdevice.h>
@@ -319,35 +320,39 @@ inline bool isWidgetOpaque(const QWidget *w)
return false;
}
-
-void QDirectFBWindowSurface::flush(QWidget *, const QRegion &region,
+void QDirectFBWindowSurface::flush(QWidget *widget, const QRegion &region,
const QPoint &offset)
{
- // hw: make sure opacity information is updated before compositing
- if (QWidget *win = window()) {
+ QWidget *win = window();
+ if (!win)
+ return;
- const bool opaque = isWidgetOpaque(win);
- if (opaque != isOpaque()) {
- SurfaceFlags flags = surfaceFlags();
- if (opaque) {
- flags |= Opaque;
- } else {
- flags &= ~Opaque;
- }
- setSurfaceFlags(flags);
+ QWExtra *extra = qt_widget_private(widget)->extraData();
+ if (extra && extra->proxyWidget)
+ return;
+
+ // hw: make sure opacity information is updated before compositing
+ const bool opaque = isWidgetOpaque(win);
+ if (opaque != isOpaque()) {
+ SurfaceFlags flags = surfaceFlags();
+ if (opaque) {
+ flags |= Opaque;
+ } else {
+ flags &= ~Opaque;
}
+ setSurfaceFlags(flags);
+ }
#ifndef QT_NO_DIRECTFB_WM
- const quint8 winOpacity = quint8(win->windowOpacity() * 255);
- quint8 opacity;
+ const quint8 winOpacity = quint8(win->windowOpacity() * 255);
+ quint8 opacity;
- if (dfbWindow) {
- dfbWindow->GetOpacity(dfbWindow, &opacity);
- if (winOpacity != opacity)
- dfbWindow->SetOpacity(dfbWindow, winOpacity);
- }
-#endif
+ if (dfbWindow) {
+ dfbWindow->GetOpacity(dfbWindow, &opacity);
+ if (winOpacity != opacity)
+ dfbWindow->SetOpacity(dfbWindow, winOpacity);
}
+#endif
const QRect windowGeometry = QDirectFBWindowSurface::geometry();
#ifdef QT_NO_DIRECTFB_WM