| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,7 +46,7 @@ def on_draw_event(self, widget, ctx): | |||
| 46 | 46 | else: | |
| 47 | 47 | bbox_queue = self._bbox_queue | |
| 48 | 48 | ||
| 49 | - if HAS_CAIRO_CFFI: | ||
| 49 | + if HAS_CAIRO_CFFI and not isinstance(ctx, cairo.Context): | ||
| 50 | 50 | ctx = cairo.Context._from_pointer( | |
| 51 | 51 | cairo.ffi.cast('cairo_t **', | |
| 52 | 52 | id(ctx) + object.__basicsize__)[0], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | 11 | class RendererGTK3Cairo(backend_cairo.RendererCairo): | |
| 12 | 12 | def set_context(self, ctx): | |
| 13 | - if HAS_CAIRO_CFFI: | ||
| 13 | + if HAS_CAIRO_CFFI and not isinstance(ctx, cairo.Context): | ||
| 14 | 14 | ctx = cairo.Context._from_pointer( | |
| 15 | 15 | cairo.ffi.cast( | |
| 16 | 16 | 'cairo_t **', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -410,7 +410,7 @@ def deprecate_axes_colorcycle(value): | |||
| 410 | 410 | validate_stringlist = _listify_validator(six.text_type) | |
| 411 | 411 | validate_stringlist.__doc__ = 'return a list' | |
| 412 | 412 | ||
| 413 | - validate_gi_preference = _listify_validator(ValidateInStrings('backend.gi_preference', | ||
| 413 | + validate_gi_preference = _listify_validator(ValidateInStrings( | ||
| 414 | 414 | 'backend.gi_preference', ['gi', 'pgi'])) | |
| 415 | 415 | ||
| 416 | 416 | validate_orientation = ValidateInStrings( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments