-/* xscreensaver, Copyright (c) 1991-2013 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2014 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
free (dpy->screen->visual);
free (dpy->screen);
+ CFRelease (dpy->main_window->window.view);
free (dpy->main_window);
free (dpy);
}
Assert (data, "no bitmap data in Drawable");
- unsigned int argb = gc->gcv.foreground;
+ unsigned long argb = gc->gcv.foreground;
validate_pixel (argb, gc->depth, gc->gcv.alpha_allowed_p);
if (gc->depth == 1)
argb = (gc->gcv.foreground ? WhitePixel(0,0) : BlackPixel(0,0));
if (x >= 0 && x < w && y >= 0 && y < h) {
unsigned int *p = (unsigned int *)
((char *) data + (size_t) y * bpr + (size_t) x * 4);
- *p = argb;
+ *p = (unsigned int) argb;
}
}
} else {
if (x >= 0 && x < w && y >= 0 && y < h) {
unsigned int *p = (unsigned int *)
((char *) data + (size_t) y * bpr + (size_t) x * 4);
- *p = argb;
+ *p = (unsigned int) argb;
}
}
}
if (orig_dst_y < dst_y0) {
fill_rect_memset (seek_xy (dst_data, dst_pitch,
orig_dst_x, orig_dst_y), dst_pitch,
- gc->gcv.background, orig_width,
+ (uint32_t) gc->gcv.background, orig_width,
dst_y0 - orig_dst_y);
}
fill_rect_memset (seek_xy (dst_data, dst_pitch, orig_dst_x,
dst_y0 + height0),
dst_pitch,
- gc->gcv.background, orig_width,
+ (uint32_t) gc->gcv.background, orig_width,
orig_dst_y + orig_height - dst_y0 - height0);
}
if (orig_dst_x < dst_x0) {
fill_rect_memset (seek_xy (dst_data, dst_pitch, orig_dst_x, dst_y0),
- dst_pitch, gc->gcv.background,
+ dst_pitch, (uint32_t) gc->gcv.background,
dst_x0 - orig_dst_x, height0);
}
if (dst_x0 + width0 < orig_dst_x + orig_width) {
fill_rect_memset (seek_xy (dst_data, dst_pitch, dst_x0 + width0,
dst_y0),
- dst_pitch, gc->gcv.background,
+ dst_pitch, (uint32_t) gc->gcv.background,
orig_dst_x + orig_width - dst_x0 - width0,
height0);
}
ximage->format = format;
ximage->data = data;
ximage->bitmap_unit = 8;
- ximage->byte_order = MSBFirst;
+ ximage->byte_order = LSBFirst;
ximage->bitmap_bit_order = ximage->byte_order;
ximage->bitmap_pad = bitmap_pad;
ximage->depth = depth;
unsigned long plane_mask, int format)
{
const unsigned char *data = 0;
- int depth, ibpp, ibpl;
+ size_t depth, ibpp, ibpl;
enum { RGBA, ARGB, BGRA } src_format; // As bytes.
# ifndef USE_BACKBUFFER
NSBitmapImageRep *bm = 0;
data += (y * ibpl) + (x * (ibpp/8));
format = (depth == 1 ? XYPixmap : ZPixmap);
- XImage *image = XCreateImage (dpy, 0, depth, format, 0, 0, width, height,
- 0, 0);
+ XImage *image = XCreateImage (dpy, 0, (unsigned int) depth,
+ format, 0, 0, width, height, 0, 0);
image->data = (char *) malloc (height * image->bytes_per_line);
int obpl = image->bytes_per_line;
while (*s2 && (*s2 != '*' && *s2 != '-'))
s2++;
- int L = s2-s;
+ unsigned long L = s2-s;
if (s == s2)
;
# define CMP(STR) (L == strlen(STR) && !strncasecmp (s, (STR), L))
return TrueColor;
}
+int
+get_bits_per_pixel (Display *dpy, int depth)
+{
+ Assert (depth == 32 || depth == 1, "unexpected depth");
+ return depth;
+}
+
// declared in utils/grabclient.h
Bool
use_subwindow_mode_p (Screen *screen, Window window)