summaryrefslogtreecommitdiffstats
path: root/config.profiles/harmattan/patches/qwidget_x11.diff
diff options
context:
space:
mode:
Diffstat (limited to 'config.profiles/harmattan/patches/qwidget_x11.diff')
-rw-r--r--config.profiles/harmattan/patches/qwidget_x11.diff39
1 files changed, 39 insertions, 0 deletions
diff --git a/config.profiles/harmattan/patches/qwidget_x11.diff b/config.profiles/harmattan/patches/qwidget_x11.diff
new file mode 100644
index 0000000000..8bcb011dfd
--- /dev/null
+++ b/config.profiles/harmattan/patches/qwidget_x11.diff
@@ -0,0 +1,39 @@
+commit 4ecc45086102807901a3bd2b9e02a169ca212716
+Author: Harald Fernengel <harald.fernengel@nokia.com>
+Date: Thu Dec 9 10:51:01 2010 +0100
+
+ Fix a rare race condition when showing windows
+
+ When setting a window to translucent shortly before showing it with the
+ OpenGL graphics system, the hijacking would call XDestroyWindow without
+ resetting the internal state. This might lead to the window waiting for
+ a map notify message forever.
+
+ The patch now properly resets the internal state when destroying the old
+ window, so it'll get mapped correctly when show() is called.
+
+ Reviewed-by: Denis Dzyubenko
+
+Index: qt-maemo-qtp/src/gui/kernel/qwidget_x11.cpp
+===================================================================
+--- qt-maemo-qtp.orig/src/gui/kernel/qwidget_x11.cpp
++++ qt-maemo-qtp/src/gui/kernel/qwidget_x11.cpp
+@@ -961,8 +961,17 @@
+ inputContext->setFocusWidget(q);
+ }
+
+- if (destroyw)
++ if (destroyw) {
+ qt_XDestroyWindow(q, dpy, destroyw);
++ if (QTLWExtra *topData = maybeTopData()) {
++#ifndef QT_NO_XSYNC
++ if (topData->syncUpdateCounter)
++ XSyncDestroyCounter(dpy, topData->syncUpdateCounter);
++#endif
++ // we destroyed our old window - reset the top-level state
++ createTLSysExtra();
++ }
++ }
+
+ // newly created windows are positioned at the window system's
+ // (0,0) position. If the parent uses wrect mapping to expand the