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