X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=OSX%2Fjwxyz.m;h=15d82135ade30bf2d4a10395924854db03ba365d;hp=06db22436a21bfb8d3362ace7b0067b8d9675894;hb=019de959b265701cd0c3fccbb61f2b69f06bf9ee;hpb=2762a7d7cf8d83e68b8f635941f6609119d630ae diff --git a/OSX/jwxyz.m b/OSX/jwxyz.m index 06db2243..15d82135 100644 --- a/OSX/jwxyz.m +++ b/OSX/jwxyz.m @@ -244,6 +244,11 @@ jwxyz_window_resized (Display *dpy, Window w, CGDisplayCount n; dpy->cgdpy = 0; CGGetDisplaysWithPoint (p, 1, &dpy->cgdpy, &n); + // Auuugh! + if (! dpy->cgdpy) { + p.x = p.y = 0; + CGGetDisplaysWithPoint (p, 1, &dpy->cgdpy, &n); + } Assert (dpy->cgdpy, "unable to find CGDisplay"); } # endif // USE_IPHONE @@ -775,8 +780,15 @@ XCopyArea (Display *dpy, Drawable src, Drawable dst, GC gc, // Sort-of-special case where no pixels can be grabbed from the source, // and the whole destination is filled with the background color. if (src_rect.size.width < 0 || src_rect.size.height < 0) { + + Assert((int)src_rect.size.width == (int)dst_rect.size.width || + (int)src_rect.size.height == (int)dst_rect.size.height, + "size mismatch"); + src_rect.size.width = 0; src_rect.size.height = 0; + dst_rect.size.width = 0; + dst_rect.size.height = 0; } NSObject *releaseme = 0;