[Pkg-wmaker-commits] [wmsystemtray] 03/34: * Add debian directory, so I can create local debs. If a Debian developer wants to officially package this for Debian, just let me know and I will gladly remove it from my upstream sources. * Poorly-behaved apps (i.e. pretty much all of them) die if their tray icon window gets destroyed. Use XFixesChangeSaveSet to prevent this from happening if someone uses Window Maker's "Kill" on us. * Generic configure cleanups. * Minor fixes to build cleanly with -Wall. * Bump copyright date. * 1.1 release.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 04:01:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmsystemtray.

commit b9c3d053f94677d58c85087cbda28d6ad87e481c
Author: Brad Jorsch <anomie at users.sourceforge.net>
Date:   Mon Jan 18 19:33:49 2010 +0000

    * Add debian directory, so I can create local debs. If a Debian developer
      wants to officially package this for Debian, just let me know and I will
      gladly remove it from my upstream sources.
    * Poorly-behaved apps (i.e. pretty much all of them) die if their tray icon
      window gets destroyed. Use XFixesChangeSaveSet to prevent this from
      happening if someone uses Window Maker's "Kill" on us.
    * Generic configure cleanups.
    * Minor fixes to build cleanly with -Wall.
    * Bump copyright date.
    * 1.1 release.
    
    
    git-svn-id: https://svn.code.sf.net/p/wmsystemtray/code@3 8177d978-5354-4e5a-a197-9fd626d94383
---
 ChangeLog            | 14 ++++++++++++++
 Makefile.am          |  6 +++---
 configure.ac         | 15 ++++++++-------
 debian/Makefile.am   |  2 ++
 debian/README.Debian |  8 ++++++++
 debian/changelog     | 11 +++++++++++
 debian/compat        |  1 +
 debian/control       | 16 ++++++++++++++++
 debian/copyright     | 43 +++++++++++++++++++++++++++++++++++++++++++
 debian/docs          |  0
 debian/menu          |  2 ++
 debian/rules         | 13 +++++++++++++
 fdtray.c             |  2 +-
 wmsystemtray.c       | 17 +++++++++++++----
 14 files changed, 135 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6f028c3..d4d1f18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+wmsystemtray (1.1) unstable; urgency=low
+
+  * Add debian directory, so I can create local debs. If a Debian developer
+    wants to officially package this for Debian, just let me know and I will
+    gladly remove it from my upstream sources.
+  * Poorly-behaved apps (i.e. pretty much all of them) die if their tray icon
+    window gets destroyed. Use XFixesChangeSaveSet to prevent this from
+    happening if someone uses Window Maker's "Kill" on us.
+  * Generic configure cleanups.
+  * Minor fixes to build cleanly with -Wall.
+  * Bump copyright date.
+
+ -- Brad Jorsch <anomie at users.sourceforge.net>  Mon, 18 Jan 2010 14:16:56 -0500
+
 wmsystemtray (1.0) unstable; urgency=low
 
   * Initial release.
diff --git a/Makefile.am b/Makefile.am
index e145bf2..c36558e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,13 +1,13 @@
 AUTOMAKE_OPTIONS = foreign
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = b0rken m4
+SUBDIRS = b0rken m4 debian
 
 bin_PROGRAMS = wmsystemtray
 
 wmsystemtray_SOURCES = fdtray.c fdtray.h wmsystemtray.c wmsystemtray.h wmsystemtray.xpm
-wmsystemtray_CFLAGS = @X_CFLAGS@ @libXmu_CFLAGS@ @libXmuu_CFLAGS@
-wmsystemtray_LDADD = b0rken/libb0rken.a @XLIBS@ @libXmu_LIBS@ @libXmuu_LIBS@
+wmsystemtray_CFLAGS = @X_CFLAGS@
+wmsystemtray_LDADD = b0rken/libb0rken.a @X_LIBS@
 
 man_MANS = wmsystemtray.1
 EXTRA_DIST = bootstrap $(man_MANS)
diff --git a/configure.ac b/configure.ac
index 1bfa6cd..54a1f38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 AC_INIT(wmsystemtray.c)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(wmsystemtray, 1.0)
+AM_INIT_AUTOMAKE(wmsystemtray, 1.1)
 
 DATE=`date '+%B %e, %Y'`
 AC_SUBST(DATE)
@@ -16,8 +16,10 @@ AC_PROG_LN_S
 AC_PROG_RANLIB
 
 # Checks for libraries.
-PKG_CHECK_MODULES(libXmuu,xmuu,,[
- PKG_CHECK_MODULES(libXmu,xmu)
+PKG_CHECK_MODULES(Xext,xext)
+PKG_CHECK_MODULES(Xfixes,xfixes)
+PKG_CHECK_MODULES(Xmuu,xmuu,,[
+ PKG_CHECK_MODULES(Xmu,xmu)
 ])
 
 # Checks for header files.
@@ -58,12 +60,11 @@ AC_FUNC_MALLOC
 if test "$ac_cv_func_malloc_0_nonnull" != "yes"; then AC_MSG_WARN(malloc() doesn't seem to work); fi
 AC_CHECK_FUNCS([atexit dup2 mkdir select strchr strcspn strdup strerror strrchr strspn strstr strtol],, AC_MSG_WARN($ac_func doesn't seem to be available))
 
-CFLAGS="$CFLAGS \$(X_CFLAGS) \$(libnotify_CFLAGS)"
-LIBS="$LIBS"
-XLIBS="\$(X_PRE_LIBS) \$(X_LIBS) \$(LINK_XPM) -lX11 -lXext \$(X_EXTRA_LIBS) \$(libnotify_LIBS)"
-AC_SUBST(XLIBS)
+X_CFLAGS="$X_CFLAGS \$(Xmu_CFLAGS) \$(Xmuu_CFLAGS) \$(Xfixes_CFLAGS) \$(Xext_CFLAGS)"
+X_LIBS="\$(X_PRE_LIBS) $X_LIBS \$(LINK_XPM) -lX11 \$(X_EXTRA_LIBS) \$(Xmu_LIBS) \$(Xmuu_LIBS) \$(Xfixes_LIBS) \$(Xext_LIBS)"
 
 AC_CONFIG_FILES([Makefile wmsystemtray.1])
 AC_CONFIG_FILES([b0rken/Makefile])
 AC_CONFIG_FILES([m4/Makefile])
+AC_CONFIG_FILES([debian/Makefile])
 AC_OUTPUT
diff --git a/debian/Makefile.am b/debian/Makefile.am
new file mode 100644
index 0000000..fbbc0d9
--- /dev/null
+++ b/debian/Makefile.am
@@ -0,0 +1,2 @@
+SUBDIRS =
+EXTRA_DIST = changelog compat control copyright docs menu README.Debian rules
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..3a88e7c
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,8 @@
+wmsystemtray for Debian
+-----------------------
+
+If a Debian developer wants to officially package this for Debian, just let me
+know and I will gladly remove this debian directory from my upstream sources.
+Until then, I want the package in my local repository.
+
+ -- Brad Jorsch <anomie at users.sourceforge.net>  Sat, 16 Jan 2010 20:52:20 -0500
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..9b830c7
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,11 @@
+wmsystemtray (1.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Brad Jorsch <anomie at users.sourceforge.net>  Mon, 18 Jan 2010 14:24:15 -0500
+
+wmsystemtray (1.0-1) unstable; urgency=low
+
+  * Initial release
+
+ -- Brad Jorsch <anomie at users.sourceforge.net>  Sat, 16 Jan 2010 20:52:20 -0500
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..8c2172a
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,16 @@
+Source: wmsystemtray
+Section: utils
+Priority: extra
+Maintainer: Brad Jorsch <anomie at users.sourceforge.net>
+Build-Depends: debhelper (>= 7), autotools-dev
+Standards-Version: 3.8.3
+Homepage: http://sourceforge.net/projects/wmsystemtray/
+
+Package: wmsystemtray
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: A freedesktop.org system tray as a Window Maker dock app
+ wmsystemtray is a system tray using the freedesktop.org system tray
+ protocol designed as a Window Maker dock app. It has the ability to
+ display more than one dock window to make room for more tray icons, and the
+ ability to scroll through the icons if more are present than will fit.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..62e4feb
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,43 @@
+This work was packaged for Debian by:
+
+    Brad Jorsch <anomie at users.sourceforge.net> on Sat, 16 Jan 2010 20:52:20 -0500
+
+It was downloaded from:
+
+    <http://sourceforge.net/projects/wmsystemtray/>
+
+Upstream Author(s):
+
+    Brad Jorsch <anomie at users.sourceforge.net>
+
+Copyright:
+
+    <Copyright (C) 2010 Brad Jorsch>
+
+License:
+
+    This package is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
+
+The Debian packaging is:
+
+    Copyright (C) 2010 Brad Jorsch <anomie at users.sourceforge.net>
+
+you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..e69de29
diff --git a/debian/menu b/debian/menu
new file mode 100644
index 0000000..01f8508
--- /dev/null
+++ b/debian/menu
@@ -0,0 +1,2 @@
+?package(wmsystemtray):needs="X11" section="Applications/Viewers"\
+  title="wmsystemtray" command="/usr/bin/wmsystemtray"
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..917d9bf
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+	dh  $@
diff --git a/fdtray.c b/fdtray.c
index c56356b..cf115c5 100644
--- a/fdtray.c
+++ b/fdtray.c
@@ -1,5 +1,5 @@
 /* wmsystemtray
- * Copyright © 2009  Brad Jorsch <anomie at users.sourceforge.net>
+ * Copyright © 2009-2010  Brad Jorsch <anomie at users.sourceforge.net>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/wmsystemtray.c b/wmsystemtray.c
index 594d58a..14179d7 100644
--- a/wmsystemtray.c
+++ b/wmsystemtray.c
@@ -1,5 +1,5 @@
 /* wmsystemtray
- * Copyright © 2009  Brad Jorsch <anomie at users.sourceforge.net>
+ * Copyright © 2009-2010  Brad Jorsch <anomie at users.sourceforge.net>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 #include <X11/xpm.h>
+#include <X11/extensions/Xfixes.h>
 #include <X11/extensions/shape.h>
 #include <X11/Xmu/SysUtil.h>
 
@@ -53,7 +54,7 @@ static Bool id_windows=False;
 static Bool point_messages=False;
 static int fill_style=0;
 static int arrow_style=0;
-static Bool no_messages=False;
+//static Bool no_messages=False;
 static int testmessagecount=0;
 
 Display *display=NULL;
@@ -139,6 +140,14 @@ struct trayicon *icon_add(int type, Window w, void *data){
         warn(DEBUG_ERROR, "Memory allocation failed");
         return NULL;
     }
+
+    void *v=catch_BadWindow_errors();
+    XFixesChangeSaveSet(display, w, SetModeInsert, SaveSetRoot, SaveSetUnmap);
+    if(uncatch_BadWindow_errors(v)){
+        warn(DEBUG_INFO, "Tray icon %lx is invalid, not adding", w);
+        return NULL;
+    }
+
     warn(DEBUG_DEBUG, "Adding tray icon %lx of type %d", w, type);
     icon->type = type;
     icon->w = w;
@@ -358,7 +367,7 @@ static void create_dock_windows(int argc, char **argv){
     Atom           _NET_WM_PID;
     XGCValues      gcv;
     unsigned long  gcm;
-    char           buf[1024], *n;
+    char           buf[1024];
     int            err, dummy=0, pid;
     Pixel          fgpix, bgpix;
 
@@ -722,7 +731,7 @@ int main(int argc, char *argv[]){
               case DestroyNotify:
                 if(exitapp) break;
                 if(selwindow==ev.xdestroywindow.window){
-                    warn(DEBUG_WARN, "Selection window destroyed!", ev.xdestroywindow.window);
+                    warn(DEBUG_WARN, "Selection window %lx destroyed!", ev.xdestroywindow.window);
                     exitapp=1;
                 }
                 for(int i=0; !exitapp && i<num_windows; i++){

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmsystemtray.git



More information about the Pkg-wmaker-commits mailing list