Author: musuruan
Update of /cvs/nonfree/rpms/xsnow/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv2279/devel
Modified Files:
.cvsignore sources
Added Files:
xsnow-1.42-Imakefile.patch xsnow-1.42-fixoptions.patch
xsnow-1.42-manpage.patch xsnow-1.42-misc.patch
xsnow-1.42-vroot.patch xsnow.spec
Log Message:
Firt import
xsnow-1.42-Imakefile.patch:
Imakefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE xsnow-1.42-Imakefile.patch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_Imakefile.dpatch by <mlazar(a)kerio.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: New patch generated from xsnow 1.42-7 diff.gz
@DPATCH@
--- xsnow-1.42.orig/Imakefile
+++ xsnow-1.42/Imakefile
@@ -1,4 +1,4 @@
-SYS_LIBRARIES = -lm -lXpm
+SYS_LIBRARIES = -lXpm
LOCAL_LIBRARIES = $(XLIB)
DEPLIBS = $(DEPXLIB)
SRCS = xsnow.c toon_root.c xsnow.h vroot.h
xsnow-1.42-fixoptions.patch:
xsnow.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
--- NEW FILE xsnow-1.42-fixoptions.patch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_fixoptions.dpatch by <caiqian(a)localhost.localdomain>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: -nokeepsnow will not update screen if there are expose events. ie. after
## DP: start xsnow, move away a window, the snow will not show on the area of
## DP: previous window.
## DP:
## DP: -nokeepsnowonwindows will cause snow erased on the bottom of screen as
## DP: well.
@DPATCH@
--- xsnow-1.42.orig/xsnow.c 2001-12-15 23:44:47.000000000 +0000
+++ xsnow-1.42/xsnow.c 2005-12-27 16:18:47.923074008 +0000
@@ -653,7 +653,7 @@
if (stilltddr) {
stilltddr = !DDLT();
}
- if (!NoKeepSnow) {
+
switch (ev.type) {
case Expose:
#if debug
@@ -746,7 +746,7 @@
}
}
- }
+
#if debug
#endif
uSsleep(snowDelay);
@@ -1362,8 +1362,6 @@
XOffsetRegion(rscrr, 0,MaxYStep+MaxSnowFlakeHeight);
XSubtractRegion(Wr,rscrr, rscrr);
if (NoKeepSWin) {
- XDestroyRegion(snscr);
- snscr = XCreateRegion();
return;
}
XUnionRegion(rscrr,snscr, snscr);
@@ -1378,7 +1376,7 @@
XOffsetRegion(sar, 0,-MaxWinSnowDepth);
XSubtractRegion(sar,Wr, sar);
}
- if (!NoKeepSWin) {
+ if (!NoKeepSBot) {
AllowRect.x = 0;
AllowRect.y = display_height - MaxScrSnowDepth;
AllowRect.width = display_width - 1;
xsnow-1.42-manpage.patch:
xsnow.man | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE xsnow-1.42-manpage.patch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 02_manpage.dpatch by <mlazar(a)kerio.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: New patch generated from xsnow 1.42-7 diff.gz
@DPATCH@
--- xsnow-1.42.orig/xsnow.man
+++ xsnow-1.42/xsnow.man
@@ -1,4 +1,4 @@
-.TH XSNOW 1 "Release 6" "X Version 11"
+.TH XSNOW 6 "Release 6" "X Version 11"
.SH NAME
xsnow \- let it snow on your desktop and windows
.SH SYNOPSIS
xsnow-1.42-misc.patch:
xsnow.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 53 insertions(+), 19 deletions(-)
--- NEW FILE xsnow-1.42-misc.patch ---
--- xsnow-1.42/xsnow.c.orig 2001-12-16 00:44:47.000000000 +0100
+++ xsnow-1.42/xsnow.c 2004-02-24 21:12:31.670634766 +0100
@@ -227,7 +227,7 @@
#include <X11/xpm.h>
/**** V R O O T ****/
/* For vroot.h see the credits at the beginning of Xsnow */
-/***#include <X11/vroot.h> /* if vroot.h installed in /usr/include/X11 ***/
+/***#include <X11/vroot.h> */ /* if vroot.h installed in /usr/include/X11 ***/
/* replaced by ToonGetRootWindow
#include "vroot.h"
#include "toon.h"
@@ -321,6 +321,7 @@
unsigned int RunCounter = 0;
int SantaUpdateFactor = 3;
/* Forward decls */
+void finish();
void Usage();
void SigHandler();
void SigHupHandler();
@@ -374,6 +375,7 @@
int ac;
char *av[];
{
+ XExposeEvent event;
XGCValues xgcv;
int ax;
char *arg;
@@ -383,7 +385,6 @@
int Exposed;
int ConfigureNotified;
int i;
- int x,y;
Window root; /* used in getgeometry call */
int winX, winY;
unsigned int winHeight, winWidth;
@@ -773,9 +774,50 @@
XDestroyRegion(WDR);
XDestroyRegion(rscrr);
XClearWindow(display, rootWin);
+ /* Send an expose event so that any apps that draw to the window can
+ redraw them */
+ event.type = Expose;
+ event.send_event = True;
+ event.display = display;
+ event.window = rootWin;
+ event.x = 0;
+ event.y = 0;
+ event.width = display_width;
+ event.height = display_height;
+ XSendEvent(display, rootWin, False, Expose, (XEvent *) &event);
XCloseDisplay(display);
exit(0);
} /* End of the snow */
+
+
+void finish(void)
+{
+ XExposeEvent event;
+ XDestroyRegion(Wr);
+ XDestroyRegion(snscr);
+ XDestroyRegion(sar);
+ XDestroyRegion(PrevWr);
+ XDestroyRegion(WDR);
+ XDestroyRegion(rscrr);
+ XClearWindow(display, rootWin);
+
+ /* Send an expose event so that any apps that draw to the window can
+ redraw them */
+ event.type = Expose;
+ event.send_event = True;
+ event.display = display;
+ event.window = rootWin;
+ event.x = 0;
+ event.y = 0;
+ event.width = display_width;
+ event.height = display_height;
+ XSendEvent(display, rootWin, False, Expose, (XEvent *) &event);
+
+ XCloseDisplay(display);
+ exit(0);
+}
+
+
/* ------------------------------------------------------------------ */
#define USEPRT(msg) fprintf(stderr, msg)
void
@@ -906,16 +948,15 @@
}
void
-UpdateSnowflake(rx)
-int rx;
+UpdateSnowflake(int rx)
{
Snow *snow;
-int NewX;
-int NewY;
-int tmp_x;
-int TouchDown;
-int InVisible;
-int NoErase;
+int NewX = 0;
+int NewY = 0;
+int tmp_x = 0;
+int TouchDown = 0;
+int InVisible = 0;
+int NoErase = 0;
snow = &snowflakes[rx];
NoErase = 0;
if (!snow->active) {
@@ -1058,7 +1099,6 @@
void InitSantaPixymaps()
{
int rc;
- char t[255];
#if debug
printf("InitSantaPixymaps: SantaSize=%d Rudolf=%d\n", SantaSize,Rudolf);
#endif
@@ -1135,7 +1175,6 @@
UpdateSanta()
{
int Visible;
-int tmp_x;
static int SantaXWindXcel = 0;
if (SantaVisible) EraseSanta();
if (wind) {
@@ -1282,12 +1321,9 @@
unsigned int nChildren;
Window dummy;
XWindowAttributes wa;
- int wx;
- XRectangle CatchRect;
- XRectangle AllowRect;
XRectangle WinRect;
+ int wx;
int winX, winY;
- int NouMoe;
unsigned int winHeight, winWidth;
unsigned int depth;
@@ -1327,7 +1363,7 @@
if (wa.map_state == IsViewable) {
XGetGeometry(display, children[wx], &dummy, &winX, &winY,
&winWidth, &winHeight, &borderWidth, &depth);
- /*if (winWidth == 1280) continue; /* debug */
+ /*if (winWidth == 1280) continue; */ /* debug */
#if debug
printf("\nw x:%d y:%d w:%d h:%d - bw:%d d:%d \n",
winX,winY,winWidth,winHeight,borderWidth,depth);
#endif
@@ -1438,8 +1474,6 @@
}
void HEAr(int X,int Y,int W, int H) {
int AddX,AddY;
-int ClearX, ClearY;
-/*return; /* DEBUG */
AddX = X - MaxSnowFlakeHeight;
AddY = Y - MaxWinSnowDepth;
AddRect.height = H + MaxWinSnowDepth;
xsnow-1.42-vroot.patch:
vroot.h | 45 +++++++++++++++++++++++++++++++++++++++------
1 file changed, 39 insertions(+), 6 deletions(-)
--- NEW FILE xsnow-1.42-vroot.patch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## vroot.dpatch by <mlazar(a)email.cz>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Used vroot.h from xscreensaver 4.23.
@DPATCH@
diff -urNad xsnow-1.42~/vroot.h xsnow-1.42/vroot.h
--- xsnow-1.42~/vroot.h 1995-11-19 12:53:29.000000000 +0100
+++ xsnow-1.42/vroot.h 2008-10-28 20:55:54.000000000 +0100
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 2 -*- */
/*****************************************************************************/
/** Copyright 1991 by Andreas Stolcke **/
/** Copyright 1990 by Solbourne Computer Inc. **/
@@ -52,13 +53,29 @@
* - replaced all NULL's with properly cast 0's, 5/6/91
* - free children list (suggested by Mark Martin <mmm(a)cetia.fr>), 5/16/91
* - include X11/Xlib.h and support RootWindowOfScreen, too 9/17/91
+ *
+ * Jamie Zawinski <jwz(a)jwz.org>, 28-Apr-1997
+ * - use ANSI C
+ *
+ * Jamie Zawinski <jwz(a)jwz.org>, 3-Sep-2003
+ * - if the environment variable "XSCREENSAVER_WINDOW" is set, use that
+ * as the root window instead of searching for __SWM_VROOT.
+ *
+ * Jamie Zawinski <jwz(a)jwz.org>, 14-Aug-2004
+ * - changes to get gcc to stop whining about "type punning".
+ *
+ * Jamie Zawinski <jwz(a)jwz.org>, 16-Dec-2004
+ * - fixed that last fix.
*/
#ifndef _VROOT_H_
#define _VROOT_H_
+#define _XSCREENSAVER_VROOT_H_
#if !defined(lint) && !defined(SABER)
-static char vroot_rcsid[] = "$Id: vroot.h,v 1.4 1991/09/30 19:23:16 stolcke Exp
stolcke $";
+static const char vroot_rcsid[] =
+ "#Id: vroot.h,v 1.8 2004/12/16 05:33:54 jwz Exp #" "\n"
+ "#Id: vroot.h,v 1.4 1991/09/30 19:23:16 stolcke Exp stolcke #";
#endif
#include <X11/X.h>
@@ -66,8 +83,11 @@
#include <X11/Xlib.h>
static Window
-VirtualRootWindowOfScreen(screen)
- Screen *screen;
+#ifdef __STDC__ /* ANSIfication added by jwz, to avoid superfluous warnings. */
+VirtualRootWindowOfScreen(Screen *screen)
+#else /* !__STDC__ */
+VirtualRootWindowOfScreen(screen) Screen *screen;
+#endif /* !__STDC__ */
{
static Screen *save_screen = (Screen *)0;
static Window root = (Window)0;
@@ -79,6 +99,19 @@
Window rootReturn, parentReturn, *children;
unsigned int numChildren;
+ /* first check for a hex or decimal window ID in the environment */
+ const char *xss_id = getenv("XSCREENSAVER_WINDOW");
+ if (xss_id && *xss_id) {
+ unsigned long id = 0;
+ char c;
+ if (1 == sscanf (xss_id, " 0x%lx %c", &id, &c) ||
+ 1 == sscanf (xss_id, " %lu %c", &id, &c)) {
+ root = (Window) id;
+ save_screen = screen;
+ return root;
+ }
+ }
+
root = RootWindowOfScreen(screen);
/* go look for a virtual root */
@@ -89,15 +122,15 @@
Atom actual_type;
int actual_format;
unsigned long nitems, bytesafter;
- Window *newRoot = (Window *)0;
+ unsigned char *newRoot = 0;
if (XGetWindowProperty(dpy, children[i],
__SWM_VROOT, 0, 1, False, XA_WINDOW,
&actual_type, &actual_format,
&nitems, &bytesafter,
- (unsigned char **) &newRoot) == Success
+ &newRoot) == Success
&& newRoot) {
- root = *newRoot;
+ root = *((Window *) newRoot);
break;
}
}
--- NEW FILE xsnow.spec ---
Name: xsnow
Version: 1.42
Release: 16%{?dist}
Summary: An X Window System based dose of Christmas cheer
Group: Amusements/Graphics
License: Distributable
URL:
http://dropmix.xs4all.nl/rick/Xsnow/
Source0:
http://dropmix.xs4all.nl/rick/Xsnow/%{name}-%{version}.tar.gz
# Fedora Core 3
Patch0: %{name}-1.42-misc.patch
# Debian
Patch1: %{name}-1.42-fixoptions.patch
Patch2: %{name}-1.42-Imakefile.patch
Patch3: %{name}-1.42-manpage.patch
Patch4: %{name}-1.42-vroot.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libX11-devel
BuildRequires: libXt-devel
BuildRequires: libXpm-devel
BuildRequires: libXext-devel
BuildRequires: xorg-x11-proto-devel
BuildRequires: imake
%description
The Xsnow toy provides a continual gentle snowfall, trees, and Santa
Claus flying his sleigh around the screen. Xsnow is only for the X
Window System, though; consoles just get coal.
%prep
%setup -q
# Redraw windows when exiting
%patch0 -p1
# Patch broken -nokeepsnowonwindows and -nokeepsnow options
%patch1 -p1
# Do not link lm
%patch2 -p1
# xsnow.man belongs to section 6
%patch3 -p1
# Use vroot.h from xscreensaver 4.23
%patch4 -p1
%build
xmkmf -a
make CDEBUGFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# Install man page
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man6
install -m 644 xsnow.man $RPM_BUILD_ROOT%{_mandir}/man6/xsnow.6
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_mandir}/man6/%{name}.6*
%doc README
%changelog
* Sat Dec 12 2009 Andrea Musuruane <musuruan(a)gmail.com> 1.42-16
- first release for RPM Fusion
- updated package to Fedora guidelines
- used Debian patches
* Tue Jun 15 2004 Elliot Lee <sopwith(a)redhat.com>
- rebuilt
* Tue Feb 24 2004 Than Ngo <than(a)redhat.com> 1.42-14
- cleanup codes, #116665
* Fri Feb 13 2004 Elliot Lee <sopwith(a)redhat.com>
- rebuilt
* Wed Nov 26 2003 Than Ngo <than(a)redhat.com> 1.42-12
- BuildRequires on XFree86-devel
* Wed Jun 04 2003 Elliot Lee <sopwith(a)redhat.com>
- rebuilt
* Wed Jan 22 2003 Tim Powers <timp(a)redhat.com>
- rebuilt
* Thu Nov 7 2002 Than Ngo <than(a)redhat.com> 1.42-9
- fix unpackaged files issue
* Mon Aug 26 2002 Than Ngo <than(a)redhat.com> 1.42-8
- get rid of desktop file (bug #69556)
* Wed Jul 24 2002 Than Ngo <than(a)redhat.com> 1.42-7
- desktop file issue (bug #69556)
* Fri Jun 21 2002 Tim Powers <timp(a)redhat.com>
- automated rebuild
* Thu May 23 2002 Tim Powers <timp(a)redhat.com>
- automated rebuild
* Wed Apr 24 2002 Than Ngo <than(a)redhat.com> 1.42-4
- add missing icon
* Mon Feb 25 2002 Than Ngo <than(a)redhat.com> 1.42-3
- rebuild in new enviroment
* Wed Jan 09 2002 Tim Powers <timp(a)redhat.com>
- automated rebuild
* Fri Dec 21 2001 Than Ngo <than(a)redhat.com> 1.42-1
- update to 1.42
- add Url
- fix bug #53192, #53194, #52132
* Mon May 21 2001 Tim Powers <timp(a)redhat.com>
- built for the distro
* Tue Nov 7 2000 Than Ngo <than(a)redhat.com>
- clean up specfile
* Mon Jul 24 2000 Prospector <prospector(a)redhat.com>
- rebuilt
* Thu Jul 13 2000 Than Ngo <than(a)redhat.de>
- rebuilt
* Thu Jun 01 2000 Than Ngo <than(a)redhat.de>
- rebuild for 7.0
- gzip man page
- remove wmconfig/xsnow, add xsnow.desktop
* Tue Jul 27 1999 Tim Powers <timp(a)redhat.com>
- rebuilt for 6.1
* Mon Dec 20 1998 Michael Maher <mike(a)redhat.com>
- built package for 6.0
* Fri May 08 1998 Prospector System <bugs(a)redhat.com>
- translations modified for de, fr, tr
* Wed Oct 22 1997 Donnie Barnes <djb(a)redhat.com>
- added wmconfig entry
* Mon Oct 20 1997 Donnie Barnes <djb(a)redhat.com>
- spec file cleanups
* Thu Jul 31 1997 Erik Troan <ewt(a)redhat.com>
- built against glibc
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/xsnow/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Dec 2009 21:31:09 -0000 1.1
+++ .cvsignore 23 Dec 2009 19:51:08 -0000 1.2
@@ -0,0 +1 @@
+xsnow-1.42.tar.gz
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/xsnow/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Dec 2009 21:31:09 -0000 1.1
+++ sources 23 Dec 2009 19:51:08 -0000 1.2
@@ -0,0 +1 @@
+451d8fc0a2b5393b428faa496a556036 xsnow-1.42.tar.gz