patches/cairo-03-buggy-repeat.diff
author Jon Tibble <meths@btinternet.com>
Sat, 06 Oct 2012 16:11:50 +0100
branchs11express-2010-11
changeset 22109 db10202d5f6d
parent 14737 3177fd2e2c5c
child 18274 838b410049a5
permissions -rw-r--r--
Added tag oi_151a_prestable7 for changeset 25dee50cecca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14737
3177fd2e2c5c 2008-12-09 Chris Wang <[email protected]>
bewitche
parents: 14626
diff changeset
     1
--- cairo-1.8.4/src/cairo-xlib-display.c.orig	2008-11-13 23:56:33.000000000 +0800
3177fd2e2c5c 2008-12-09 Chris Wang <[email protected]>
bewitche
parents: 14626
diff changeset
     2
+++ cairo-1.8.4/src/cairo-xlib-display.c	2008-11-25 14:39:56.342087676 +0800
3177fd2e2c5c 2008-12-09 Chris Wang <[email protected]>
bewitche
parents: 14626
diff changeset
     3
@@ -66,6 +66,8 @@
14519
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     4
 
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     5
 static cairo_xlib_display_t *_cairo_xlib_display_list;
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     6
 
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     7
+static int buggy_repeat_force = -1;
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     8
+
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
     9
 static void
14737
3177fd2e2c5c 2008-12-09 Chris Wang <[email protected]>
bewitche
parents: 14626
diff changeset
    10
 _cairo_xlib_remove_close_display_hook_internal (cairo_xlib_display_t *display,
3177fd2e2c5c 2008-12-09 Chris Wang <[email protected]>
bewitche
parents: 14626
diff changeset
    11
 						cairo_xlib_hook_t *hook);
3177fd2e2c5c 2008-12-09 Chris Wang <[email protected]>
bewitche
parents: 14626
diff changeset
    12
@@ -337,6 +339,17 @@
14519
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    13
 	if (VendorRelease (dpy) <= 40500000)
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    14
 	    display->buggy_repeat = TRUE;
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    15
     }
14737
3177fd2e2c5c 2008-12-09 Chris Wang <[email protected]>
bewitche
parents: 14626
diff changeset
    16
+/* workaround; see http://defect.opensolaris.org/bz/show_bug.cgi?id=4187 */
14519
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    17
+    if (buggy_repeat_force == -1) {
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    18
+        if (getenv("CAIRO_NO_BUGGY_REPEAT"))
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    19
+            buggy_repeat_force = 0;
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    20
+        else
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    21
+            buggy_repeat_force = 1;
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    22
+    }
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    23
+
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    24
+    if (buggy_repeat_force)
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    25
+        display->buggy_repeat = TRUE;
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    26
+
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    27
 
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    28
     display->next = _cairo_xlib_display_list;
17a46fcce305 2008-10-28 Erwann Chenede - <[email protected]>
erwannc
parents:
diff changeset
    29
     _cairo_xlib_display_list = display;