summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-06-06 15:54:11 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-06-06 16:03:38 +0200
commit078e4ef6c72bdc759b83b5f430390cdcdf7f4e9e (patch)
treeed480e064dd35fe2f28e786ec066def5aaeb2c4e /src/gui/kernel/qwindow.cpp
parent481067453ff5b58552ef06c82d5a65019a648907 (diff)
Made tst_QWidget::updateWhileMinimized() pass.
This requires adding a couple of window system interface events, namely Map, Unmap, and Expose. When a widget is minimized on X11 it is unmapped, and thus update requests should not be delivered. Instead the event will delivered when the widget is mapped, which causes an Expose event to be sent. The Unmap and Expose event thus need to be handled in QWidgetWindow, and Map is also added for the purpose of API symmetry (and for future needs).
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index fca8aaca46..3d227f49ca 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -49,6 +49,8 @@
#include "qwindow_p.h"
#include "qguiapplication_p.h"
+#include <private/qevent_p.h>
+
#include <QtCore/QDebug>
QT_BEGIN_NAMESPACE
@@ -486,6 +488,7 @@ void QWindow::hideEvent(QHideEvent *)
bool QWindow::event(QEvent *event)
{
+ Q_D(QWindow);
switch (event->type()) {
case QEvent::MouseMove:
mouseMoveEvent(static_cast<QMouseEvent*>(event));
@@ -525,6 +528,11 @@ bool QWindow::event(QEvent *event)
destroy();
break;
+ case QEvent::Expose:
+ if (d->surface)
+ d->surface->flush(this, static_cast<QExposeEvent *>(event)->region, QPoint());
+ break;
+
default:
return QObject::event(event);
}