projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.02.tar.gz
[xscreensaver]
/
hacks
/
slidescreen.c
diff --git
a/hacks/slidescreen.c
b/hacks/slidescreen.c
index c2fc03324b2900ac3e11113018ceb80737587f4e..e31bcf0dda9e60ba20d340c02f1c576e9ba83d5b 100644
(file)
--- a/
hacks/slidescreen.c
+++ b/
hacks/slidescreen.c
@@
-1,4
+1,4
@@
-/* xscreensaver, Copyright (c) 1992, 1993, 1994, 1996, 1997, 1998
+/* xscreensaver, Copyright (c) 1992, 1993, 1994, 1996, 1997, 1998
, 2001
* Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
@@
-37,8
+37,6
@@
init_slide (Display *dpy, Window window)
XGetWindowAttributes (dpy, window, &xgwa);
grab_screen_image (xgwa.screen, window);
XGetWindowAttributes (dpy, window, &xgwa);
grab_screen_image (xgwa.screen, window);
-
- XGetWindowAttributes (dpy, window, &xgwa); /* re-retrieve colormap */
cmap = xgwa.colormap;
visual = xgwa.visual;
max_width = xgwa.width;
cmap = xgwa.colormap;
visual = xgwa.visual;
max_width = xgwa.width;
@@
-50,6
+48,12
@@
init_slide (Display *dpy, Window window)
pix_inc = get_integer_resource ("pixelIncrement", "Integer");
border = get_integer_resource ("internalBorderWidth", "InternalBorderWidth");
pix_inc = get_integer_resource ("pixelIncrement", "Integer");
border = get_integer_resource ("internalBorderWidth", "InternalBorderWidth");
+ /* Don't let the grid be smaller than 3x3 */
+ if (grid_size > xgwa.width / 3)
+ grid_size = xgwa.width / 3;
+ if (grid_size > xgwa.height / 3)
+ grid_size = xgwa.height / 3;
+
{
XColor fgc, bgc;
char *fgs = get_string_resource("background", "Background");
{
XColor fgc, bgc;
char *fgs = get_string_resource("background", "Background");
@@
-142,7
+146,7
@@
init_slide (Display *dpy, Window window)
if (delay < 0) delay = 0;
if (delay2 < 0) delay2 = 0;
if (pix_inc < 1) pix_inc = 1;
if (delay < 0) delay = 0;
if (delay2 < 0) delay2 = 0;
if (pix_inc < 1) pix_inc = 1;
- if (grid_size < 1
) grid_size = 1
;
+ if (grid_size < 1
0) grid_size = 10
;
gcv.foreground = fg;
gcv.function = GXcopy;
gcv.foreground = fg;
gcv.function = GXcopy;