mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-29 19:40:14 +01:00
Use 1 instead of 0 for width and height to avoid BadValue errors from XCreatePixmap.
This commit is contained in:
parent
2f5b0808b8
commit
f3bc5e5554
2 changed files with 11 additions and 0 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2005-04-27 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* test/cairo-test.c: (set_xlib_target), (cleanup_xlib_target):
|
||||
Use 1 instead of 0 for width and height to avoid BadValue errors
|
||||
from XCreatePixmap.
|
||||
|
||||
2005-04-27 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* test/.cvsignore:
|
||||
|
|
|
|||
|
|
@ -207,6 +207,11 @@ set_xlib_target (cairo_t *cr, int width, int height, void **closure)
|
|||
|
||||
*closure = xtc = xmalloc (sizeof (xlib_target_closure_t));
|
||||
|
||||
if (width == 0)
|
||||
width = 1;
|
||||
if (height == 0)
|
||||
height = 1;
|
||||
|
||||
xtc->dpy = dpy = XOpenDisplay (0);
|
||||
if (xtc->dpy == NULL) {
|
||||
fprintf (stderr, "Failed to open display: %s\n", XDisplayName(0));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue