summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_x11.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2011-02-21 14:35:03 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2011-03-03 14:12:38 (GMT)
commit61dfa74bb542f495eb5ff25e3f91b9065eb1cfdd (patch)
tree58932daec7f30b14f8a5a23e52d25e37008e7f29 /src/gui/kernel/qwidget_x11.cpp
parent2b9660c4cb264dc7b8abe4c753e31c48a50b92af (diff)
downloadQt-61dfa74bb542f495eb5ff25e3f91b9065eb1cfdd.zip
Qt-61dfa74bb542f495eb5ff25e3f91b9065eb1cfdd.tar.gz
Qt-61dfa74bb542f495eb5ff25e3f91b9065eb1cfdd.tar.bz2
Do not handle posted events in QSplashScreen.
When QSplashScreen waits for the window to be fully shown, we shouldn't re-enter the event loop by processing posted events. Reviewed-by: axis Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/gui/kernel/qwidget_x11.cpp')
-rw-r--r--src/gui/kernel/qwidget_x11.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 4bff5ac..c6753fc 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -346,7 +346,7 @@ Q_GUI_EXPORT void qt_x11_enforce_cursor(QWidget * w)
qt_x11_enforce_cursor(w, false);
}
-Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w)
+void qt_x11_wait_for_window_manager(QWidget *w, bool sendPostedEvents)
{
if (!w || (!w->isWindow() && !w->internalWinId()))
return;
@@ -361,7 +361,8 @@ Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w)
WId winid = w->internalWinId();
// first deliver events that are already in the local queue
- QApplication::sendPostedEvents();
+ if (sendPostedEvents)
+ QApplication::sendPostedEvents();
// the normal sequence is:
// ... ConfigureNotify ... ReparentNotify ... MapNotify ... Expose
@@ -396,6 +397,11 @@ Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget* w)
} while(1);
}
+Q_GUI_EXPORT void qt_x11_wait_for_window_manager(QWidget *w)
+{
+ qt_x11_wait_for_window_manager(w, true);
+}
+
void qt_change_net_wm_state(const QWidget* w, bool set, Atom one, Atom two = 0)
{
if (!w->isVisible()) // not managed by the window manager