projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://www.jwz.org/xscreensaver/xscreensaver-5.13.tar.gz
[xscreensaver]
/
OSX
/
osxgrabscreen.m
diff --git
a/OSX/osxgrabscreen.m
b/OSX/osxgrabscreen.m
index f42ad34bc270b225534fcc76b8497e070ba77355..0138fcf41682682d60c9e153ef0e15f4cff5eb14 100644
(file)
--- a/
OSX/osxgrabscreen.m
+++ b/
OSX/osxgrabscreen.m
@@
-1,4
+1,4
@@
-/* xscreensaver, Copyright (c) 1992-201
0
Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-201
1
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
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@
-10,6
+10,11
@@
*/
/* This is the OSX implementation of desktop-grabbing and image-loading.
*/
/* This is the OSX implementation of desktop-grabbing and image-loading.
+ This code is invoked by "utils/grabclient.c", which is linked directly
+ in to each screen saver bundle.
+
+ X11-based builds of the savers do not use this code (even on MacOS).
+ This is used only by the Cocoa build of the savers.
*/
#import <stdlib.h>
*/
#import <stdlib.h>
@@
-216,8
+221,10
@@
osx_grab_desktop_image (Screen *screen, Window xwindow, Drawable drawable)
// Splat the XImage onto the target drawable (probably the window)
// and free the bits.
//
// Splat the XImage onto the target drawable (probably the window)
// and free the bits.
//
- GC gc = 0;
+ XGCValues gcv;
+ GC gc = XCreateGC (dpy, drawable, 0, &gcv);
XPutImage (dpy, drawable, gc, xim, 0, 0, 0, 0, xim->width, xim->height);
XPutImage (dpy, drawable, gc, xim, 0, 0, 0, 0, xim->width, xim->height);
+ XFreeGC (dpy, gc);
XDestroyImage (xim);
}
XDestroyImage (xim);
}