~hypodermia/ubuntu/oneiric/compiz/fix-for-bug-301174

« back to all changes in this revision

Viewing changes to debian/patches/00_bzr_fix_crash_with_some_apps.patch

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-04-15 17:08:40 UTC
  • mfrom: (0.168.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20110415170840-x56m5m6qs4b7n8rb
Tags: 1:0.9.4+bzr20110415-0ubuntu1
* New upstream snapshot
  - Focus problem with Thunderbird (LP: #753951)
  - Chromium fullscreen + Alt-TAB confuses the launcher (LP: #757434)
  - compiz hangs randomly several times per day (LP: #740126)
* debian/patches/00_*:
  - removed as part of upstream tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
=== modified file 'src/window.cpp'
2
 
--- a/src/window.cpp    2011-04-08 11:40:39 +0000
3
 
+++ b/src/window.cpp    2011-04-12 12:18:18 +0000
4
 
@@ -5689,6 +5689,7 @@
5
 
                                                  screen->screenNum ());
6
 
     Colormap            cmap = DefaultColormap (screen->dpy (),
7
 
                                                 screen->screenNum ());
8
 
+    bool success = false;
9
 
 
10
 
     if (frame || attrib.override_redirect)
11
 
        return false;
12
 
@@ -5700,17 +5701,22 @@
13
 
      * reparented themselves on the server side but not
14
 
      * on the client side */
15
 
 
16
 
-    XQueryTree (dpy, id, &root_return, &parent_return, &children, &nchildren);
17
 
-
18
 
-    if (parent_return != root_return)
19
 
-    {
20
 
-       XFree (children);
21
 
-       XUngrabServer (dpy);
22
 
-       XSync (dpy, false);
23
 
-       return false;
24
 
-    }
25
 
-
26
 
-    if (!XGetWindowAttributes (dpy, id, &wa))
27
 
+    success = XQueryTree (dpy, id, &root_return,
28
 
+                         &parent_return, &children, &nchildren);
29
 
+
30
 
+    if (success && parent_return != root_return)
31
 
+    {
32
 
+       success = false;
33
 
+       XFree (children);
34
 
+    }
35
 
+
36
 
+    if (success && !XGetWindowAttributes (dpy, id, &wa))
37
 
+    {
38
 
+       success = false;
39
 
+       XFree (children);
40
 
+    }
41
 
+
42
 
+    if (!success)
43
 
     {
44
 
        XUngrabServer (dpy);
45
 
        XSync (dpy, false);
46