2008-01-29 18:45:08 +00:00
|
|
|
diff --git a/gfx/cairo/cairo/src/cairo-xlib-display.c b/gfx/cairo/cairo/src/cairo-xlib-display.c
|
|
|
|
--- a/gfx/cairo/cairo/src/cairo-xlib-display.c
|
|
|
|
+++ b/gfx/cairo/cairo/src/cairo-xlib-display.c
|
2008-09-25 20:07:11 +00:00
|
|
|
@@ -216,6 +216,8 @@ _cairo_xlib_display_get (Display *dpy)
|
|
|
|
XExtCodes *codes;
|
|
|
|
int major_unused, minor_unused;
|
2008-03-05 05:45:09 +00:00
|
|
|
|
2008-09-25 20:07:11 +00:00
|
|
|
+ static int buggy_repeat_force = -1;
|
2008-03-05 05:45:09 +00:00
|
|
|
+
|
2008-09-25 20:07:11 +00:00
|
|
|
/* There is an apparent deadlock between this mutex and the
|
|
|
|
* mutex for the display, but it's actually safe. For the
|
|
|
|
* app to call XCloseDisplay() while any other thread is
|
|
|
|
@@ -308,6 +310,26 @@ _cairo_xlib_display_get (Display *dpy)
|
|
|
|
if (VendorRelease (dpy) <= 40500000)
|
2008-01-29 18:45:08 +00:00
|
|
|
display->buggy_repeat = TRUE;
|
|
|
|
}
|
2008-09-25 20:07:11 +00:00
|
|
|
+
|
2008-01-29 18:45:08 +00:00
|
|
|
+ /* XXX workaround; see https://bugzilla.mozilla.org/show_bug.cgi?id=413583 */
|
2008-09-25 20:07:11 +00:00
|
|
|
+ /* If buggy_repeat_force == -1, then initialize.
|
|
|
|
+ * - set to -2, meaning "nothing was specified", and we trust the above detection.
|
|
|
|
+ * - if MOZ_CAIRO_BUGGY_REPEAT is '0' (exactly), then force buggy repeat off
|
|
|
|
+ * - if MOZ_CAIRO_BUGGY_REPEAT is '1' (exactly), then force buggy repeat on
|
|
|
|
+ */
|
2008-03-05 05:45:09 +00:00
|
|
|
+ if (buggy_repeat_force == -1) {
|
2008-09-25 20:07:11 +00:00
|
|
|
+ const char *flag = getenv("MOZ_CAIRO_FORCE_BUGGY_REPEAT");
|
|
|
|
+
|
|
|
|
+ buggy_repeat_force = -2;
|
|
|
|
+
|
|
|
|
+ if (flag && flag[0] == '0')
|
2008-03-05 05:45:09 +00:00
|
|
|
+ buggy_repeat_force = 0;
|
2008-09-25 20:07:11 +00:00
|
|
|
+ else if (flag && flag[0] == '1')
|
2008-03-05 05:45:09 +00:00
|
|
|
+ buggy_repeat_force = 1;
|
|
|
|
+ }
|
|
|
|
+
|
2008-09-25 20:07:11 +00:00
|
|
|
+ if (buggy_repeat_force != -2)
|
|
|
|
+ display->buggy_repeat = (buggy_repeat_force == 1);
|
|
|
|
|
2008-01-29 18:45:08 +00:00
|
|
|
display->next = _cairo_xlib_display_list;
|
|
|
|
_cairo_xlib_display_list = display;
|