blob: 8bcb011dfd9adcc61d89bea1fa90f2a1fbe32123 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
|