projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.39.tar.gz
[xscreensaver]
/
hacks
/
boxfit.c
diff --git
a/hacks/boxfit.c
b/hacks/boxfit.c
index 5daa72cb982f64eca9745a1a079a49140117eb93..1b1d0d717491a52eb8494ba77f27f4b3dc6ec39b 100644
(file)
--- a/
hacks/boxfit.c
+++ b/
hacks/boxfit.c
@@
-1,4
+1,4
@@
-/* xscreensaver, Copyright (c) 2005-201
2
Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2005-201
4
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
@@
-17,7
+17,7
@@
#include "screenhack.h"
#include <stdio.h>
#include "screenhack.h"
#include <stdio.h>
-#include "x
pm-pixmap
.h"
+#include "x
image-loader
.h"
#define ALIVE 1
#define CHANGED 2
#define ALIVE 1
#define CHANGED 2
@@
-70,7
+70,7
@@
reset_boxes (state *st)
st->color_horiz_p = random() & 1;
if (st->done_once && st->colors)
st->color_horiz_p = random() & 1;
if (st->done_once && st->colors)
- free_colors (st->
dpy
, st->xgwa.colormap, st->colors, st->ncolors);
+ free_colors (st->
xgwa.screen
, st->xgwa.colormap, st->colors, st->ncolors);
if (!st->done_once)
{
if (!st->done_once)
{
@@
-121,7
+121,7
@@
reset_boxes (state *st)
{
st->ncolors = get_integer_resource (st->dpy, "colors", "Colors"); /* re-get */
if (st->ncolors < 1) st->ncolors = 1;
{
st->ncolors = get_integer_resource (st->dpy, "colors", "Colors"); /* re-get */
if (st->ncolors < 1) st->ncolors = 1;
- make_smooth_colormap (st->
dpy
, st->xgwa.visual, st->xgwa.colormap,
+ make_smooth_colormap (st->
xgwa.screen
, st->xgwa.visual, st->xgwa.colormap,
st->colors, &st->ncolors, True, 0, False);
if (st->ncolors < 1) abort();
XClearWindow (st->dpy, st->window);
st->colors, &st->ncolors, True, 0, False);
if (st->ncolors < 1) abort();
XClearWindow (st->dpy, st->window);
@@
-503,10
+503,11
@@
static Bool
boxfit_event (Display *dpy, Window window, void *closure, XEvent *event)
{
state *st = (state *) closure;
boxfit_event (Display *dpy, Window window, void *closure, XEvent *event)
{
state *st = (state *) closure;
- if (event->xany.type == ButtonPress) {
- st->growing_p = !st->growing_p;
- return True;
- }
+ if (screenhack_event_helper (dpy, window, event))
+ {
+ st->growing_p = !st->growing_p;
+ return True;
+ }
return False;
}
return False;
}
@@
-529,8
+530,12
@@
static const char *boxfit_defaults [] = {
"*borderSize: 1",
"*grab: False",
"*peek: False",
"*borderSize: 1",
"*grab: False",
"*peek: False",
- "*grabDesktopImages: False", /* HAVE_COCOA */
- "*chooseRandomImages: True", /* HAVE_COCOA */
+ "*grabDesktopImages: False", /* HAVE_JWXYZ */
+ "*chooseRandomImages: True", /* HAVE_JWXYZ */
+#ifdef HAVE_MOBILE
+ "*ignoreRotation: True",
+ "*rotateImages: True",
+#endif
0
};
0
};