summaryrefslogtreecommitdiff
path: root/sysutils/bubblemon/patches/patch-gtk2
blob: e70db5eeae8712951bafac754d4b4848760faa83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
$NetBSD: patch-gtk2,v 1.1.1.1 2009/07/20 14:06:02 ahoka Exp $

--- bubblemon.c.orig	2003-10-01 02:37:32.000000000 +0200
+++ bubblemon.c
@@ -44,7 +44,7 @@
  */
 #define _GNU_SOURCE
 
-#define VERSION "1.41"
+#define VERSION "1.42"
 
 /* general includes */
 #include <stdio.h>
@@ -575,7 +575,7 @@ static void make_new_bubblemon_dockapp(v
     attri.colormap = gdk_colormap_get_system();
     attri.wmclass_name = "bubblemon";
     attri.wmclass_class = "bubblemon";
-    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);
@@ -593,7 +593,6 @@ static void make_new_bubblemon_dockapp(v
     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);
 
@@ -611,6 +610,8 @@ static void make_new_bubblemon_dockapp(v
     gdk_window_show(bm.iconwin);
 #endif
 
+    XSetWMHints(GDK_WINDOW_XDISPLAY(bm.win), win, &wmhints);
+
     /* We begin with zero bubbles */
     bm.n_bubbles = 0;
 
@@ -664,7 +665,7 @@ static void bubblemon_update(int proximi
     /* y coordinates are counted from here multiplied by 256 */
     /* to get actual screen coordinate, divide by 256 */
     buf = bm.bubblebuf;
-    col = bm.colors;
+    col = (unsigned int *)bm.colors;
 
     waterlevel_max = 0;
     waterlevel_min = MAKEY(56);
@@ -957,7 +958,7 @@ static void bubblemon_update(int proximi
 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;
@@ -1005,7 +1006,7 @@ static void draw_history(int num, int si
 {
     int pixels_per_byte;
     int j, k;
-    int *p;
+    unsigned int *p;
     int d;
 
     pixels_per_byte = 100;
@@ -1024,9 +1025,9 @@ static void draw_history(int num, int si
 
 	for (j = 0; j < size; j++) {
 	    if (j < d - 2)
-		draw_pixel(k, size - j - 1, buf, "\x00\x7d\x71");
+		draw_pixel(k, size - j - 1, buf, (unsigned char *) "\x00\x7d\x71");
 	    else if (j < d)
-		draw_pixel(k, size - j - 1, buf, "\x20\xb6\xae");
+		draw_pixel(k, size - j - 1, buf, (unsigned char *) "\x20\xb6\xae");
 	}
 	p++;
     }
@@ -1034,7 +1035,7 @@ static void draw_history(int num, int si
     for (j = pixels_per_byte - 100; j > 0; j -= 100) {
 	for (k = 0; k < num; k++) {
 	    d = ((float) size / pixels_per_byte) * j;
-	    draw_pixel(k, size - d - 1, buf, "\x71\xe3\x71");
+	    draw_pixel(k, size - d - 1, buf, (unsigned char *) "\x71\xe3\x71");
 	}
     }
 }