Package: wmbubble
Tags: patch

Hi,

Attached is a patch for wmbubble to build against GTK+ 2.0:
 - changes the required bit in the Makefile
 - adjusts a couple of things for GTK+ 2.0
 - fixes a couple of signed/unsigned warnings (noise reduction)

Please apply, as it'll help clear the list of GTK+1.2 applications.

Thanks,

JB.

-- 
 Julien BLACHE <[EMAIL PROTECTED]>  |  Debian, because code matters more 
 Debian & GNU/Linux Developer        |       <http://www.debian.org>
 Public key available on <http://www.jblache.org> - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 

diff -ru orig/wmbubble-1.46/Makefile wmbubble-1.46/Makefile
--- orig/wmbubble-1.46/Makefile	2007-08-12 15:42:50.000000000 +0200
+++ wmbubble-1.46/Makefile	2007-08-12 15:19:03.059318304 +0200
@@ -11,7 +11,7 @@
 # no user serviceable parts below
 EXTRA += $(WMAN)
 # optimization cflags
-CFLAGS = -O3 -ansi -Wall `gtk-config --cflags` ${EXTRA}
+CFLAGS = -O3 -ansi -Wall `pkg-config gtk+-2.0 --cflags` ${EXTRA}
 # profiling cflags
 # CFLAGS = -ansi -Wall -pg -O3 `gtk-config --cflags` ${EXTRA} -DPRO
 # test coverage cflags
@@ -26,7 +26,7 @@
 # special things for Linux
 ifeq ($(OS), Linux)
     OBJS += sys_linux.o
-    LIBS = `gtk-config --libs | sed "s/-lgtk//g"`
+    LIBS = `pkg-config gtk+-2.0 --libs`
     INSTALL = -m 755
 endif
 
diff -ru orig/wmbubble-1.46/bubblemon.c wmbubble-1.46/bubblemon.c
--- orig/wmbubble-1.46/bubblemon.c	2007-08-12 15:42:50.000000000 +0200
+++ wmbubble-1.46/bubblemon.c	2007-08-12 15:35:25.115282484 +0200
@@ -92,7 +92,7 @@
 #if defined(ENABLE_CPU) || defined(ENABLE_MEMSCREEN)
 /* draw functions for load average / memory screens */
 static void draw_pixel(unsigned int x, unsigned int y, unsigned char *buf,
-		       unsigned char *c);
+		       char *c);
 static void draw_history(int num, int size, unsigned int *history,
 			 unsigned char *buf);
 static void draw_digit(int srcx, int srcy, int destx, int desty);
@@ -581,7 +581,7 @@
     attri.colormap = gdk_colormap_get_system();
     attri.wmclass_name = NAME;
     attri.wmclass_class = NAME;
-    attri.window_type = GDK_WINDOW_TOPLEVEL;
+    attri.window_type = GDK_WINDOW_CHILD;
 
     bm.iconwin = gdk_window_new(bm.win, &attri,
 				GDK_WA_TITLE | GDK_WA_WMCLASS);
@@ -599,7 +599,6 @@
     wmhints.window_group = win;
     wmhints.flags =
 	StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
-    XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints);
 
     bm.gc = gdk_gc_new(bm.win);
 
@@ -617,6 +616,8 @@
     gdk_window_show(bm.iconwin);
 #endif
 
+    XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints);
+
     /* We begin with zero bubbles */
     bm.n_bubbles = 0;
 
@@ -636,7 +637,8 @@
 static void bubblemon_update(int proximity)
 {
     Bubble *bubbles = bm.bubbles;
-    unsigned int i, loadPercentage, *col, x, y;
+    unsigned int i, loadPercentage, x, y;
+    int *col;
     unsigned char *ptr, *buf, *buf_ptr;
     unsigned int aircolor, watercolor, aliascolor;
     unsigned int waterlevels_goal;
@@ -963,7 +965,7 @@
 static void draw_digit(int srcx, int srcy, int destx, int desty)
 {
     int i, j;
-    char *from, *to;
+    unsigned char *from, *to;
 
     for (j = 0; j < 8; j++) {
 	from = mem_screen + 56 * 3 * (srcy + j) + srcx * 3;
@@ -995,7 +997,7 @@
 }
 
 static void draw_pixel(unsigned int x, unsigned int y, unsigned char *buf,
-		       unsigned char *c)
+		       char *c)
 {
     unsigned char *ptr;
     ptr = buf + y * 56 * 3 + x * 3 + 6;	/* +6 = x + 2 */
@@ -1011,7 +1013,7 @@
 {
     int pixels_per_byte;
     int j, k;
-    int *p;
+    unsigned int *p;
     int d;
 
     pixels_per_byte = 100;
Only in wmbubble-1.46: build-stamp
Only in wmbubble-1.46/debian: files
Only in wmbubble-1.46/debian: postinst.debhelper
Only in wmbubble-1.46/debian: postrm.debhelper
Only in wmbubble-1.46/debian: substvars
Only in wmbubble-1.46/debian: tmp

Reply via email to