aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/mi/miwindow.c
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2016-06-25 01:35:40 +0200
committerMihai Moldovan <ionic@ionic.de>2016-06-25 01:35:40 +0200
commit975511c875674f097bbd2be33fa947a48d8c77c6 (patch)
tree207bba2c48054f551f19ed5aa89b9dd9616b8c60 /nx-X11/programs/Xserver/mi/miwindow.c
parent9df153668423af868d0df739188a772fbc3356c6 (diff)
parenta5befd4e20813910022ed771cb599f15bbf4664d (diff)
downloadnx-libs-975511c875674f097bbd2be33fa947a48d8c77c6.tar.gz
nx-libs-975511c875674f097bbd2be33fa947a48d8c77c6.tar.bz2
nx-libs-975511c875674f097bbd2be33fa947a48d8c77c6.zip
Merge branch 'sunweaver-pr/hw-nxagent-drop-duplicate-Xserver-code_disable-Xserver-code-and-include-in-nxagent' into arctica-3.6.x
Attributes GH PR #120: https://github.com/ArcticaProject/nx-libs/pull/120
Diffstat (limited to 'nx-X11/programs/Xserver/mi/miwindow.c')
-rw-r--r--nx-X11/programs/Xserver/mi/miwindow.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/mi/miwindow.c b/nx-X11/programs/Xserver/mi/miwindow.c
index 198f765dd..aff7128c3 100644
--- a/nx-X11/programs/Xserver/mi/miwindow.c
+++ b/nx-X11/programs/Xserver/mi/miwindow.c
@@ -1048,7 +1048,25 @@ miSetShape(pWin)
bsExposed = (*pScreen->TranslateBackingStore)
(pWin, 0, 0, pOldClip,
pWin->drawable.x, pWin->drawable.y);
- if (WasViewable)
+
+ /*
+ * Applies to NXAGENT_SERVER builds:
+ *
+ * We got a few, rare, segfaults here after having
+ * started using the backing store. It may be a
+ * different bug but miChangeSaveUnder() calls mi-
+ * CheckSubSaveUnder() that, in turn, can change
+ * the backing store attribute of the window. This
+ * means that we may try to destroy the region
+ * even if it was not created at the beginning of
+ * this function as, at the time, the backing store
+ * was off. miCheckSubSaveUnder() appear to get a
+ * pointer to the parent, so maybe doesn't change
+ * the attribute of the window itself. This is to
+ * be better investigated.
+ */
+
+ if (WasViewable && pOldClip)
RegionDestroy(pOldClip);
if (bsExposed)
{