Update e-mail for Kei Kebreau.
[jackhill/guix/guix.git] / gnu / packages / patches / wmfire-update-for-new-gdk-versions.patch
CommitLineData
3c8ba11a 1This patch comes from Debian and was modified by Kei Kebreau <kkebreau@posteo.net>.
0611abff
KK
2Link: https://anonscm.debian.org/cgit/pkg-wmaker/wmfire.git/plain/debian/patches/gdk_updates.patch?h=debian/1.2.4-2&id=a272234fc5eecdbfc469adb12133196bc62f3059
3
4Description: Update for newer versions of GDK.
5 In particular, the icon window was not receiving enter and leave events from
6 the pointer. To fix this, we get rid of the second GdkWindow iconwin entirely
7 and set win to be its own icon.
8 .
9 This also removes the need for the "broken window manager" fix, so we remove it
10 and all references to it.
11Author: Doug Torrance <dtorrance@piedmont.edu>
12
13diff -ur wmfire-1.2.4.old/src/wmfire.c wmfire-1.2.4/src/wmfire.c
14--- wmfire-1.2.4.old/src/wmfire.c 2017-04-23 14:26:58.449487117 -0400
15+++ wmfire-1.2.4/src/wmfire.c 2017-04-23 14:32:10.785238671 -0400
16@@ -77,7 +77,6 @@
17 typedef struct {
18 Display *display; /* X11 display */
19 GdkWindow *win; /* Main window */
20- GdkWindow *iconwin; /* Icon window */
21 GdkGC *gc; /* Drawing GC */
22 GdkPixmap *pixmap; /* Main pixmap */
23 GdkBitmap *mask; /* Dockapp mask */
24@@ -141,7 +140,6 @@
25 int cmap = 0;
26 int lock = 0;
27 int proximity = 0;
28-int broken_wm = 0;
29
30 /******************************************/
31 /* Main */
32@@ -262,12 +260,8 @@
33 usleep(REFRESH);
34
35 /* Draw the rgb buffer to screen */
36- if (!broken_wm)
37- gdk_draw_rgb_image(bm.iconwin, bm.gc, 4, 4, XMAX, YMAX, GDK_RGB_DITHER_NONE, bm.rgb, XMAX * 3);
38- else
39- gdk_draw_rgb_image(bm.win, bm.gc, 4, 4, XMAX, YMAX, GDK_RGB_DITHER_NONE, bm.rgb, XMAX * 3);
40+ gdk_draw_rgb_image(bm.win, bm.gc, 4, 4, XMAX, YMAX, GDK_RGB_DITHER_NONE, bm.rgb, XMAX * 3);
41 }
42-
43 return 0;
44 }
45
46@@ -556,9 +550,7 @@
47 #define MASK GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_HINT_MASK
48
49 GdkWindowAttr attr;
50- GdkWindowAttr attri;
51 Window win;
52- Window iconwin;
53
54 GdkPixmap *icon;
55
56@@ -578,10 +570,6 @@
57 attr.wmclass_class = "wmfire";
58 attr.window_type = GDK_WINDOW_TOPLEVEL;
59
60- /* Make a copy for the iconwin - parameters are the same */
61- memcpy(&attri, &attr, sizeof (GdkWindowAttr));
62- attri.window_type = GDK_WINDOW_CHILD;
63-
64 sizehints.flags = USSize;
65 sizehints.width = 64;
66 sizehints.height = 64;
67@@ -592,18 +580,11 @@
68 exit(1);
69 }
70
71- bm.iconwin = gdk_window_new(bm.win, &attri, GDK_WA_TITLE | GDK_WA_WMCLASS);
72- if (!bm.iconwin) {
73- fprintf(stderr, "FATAL: Cannot make icon window\n");
74- exit(1);
75- }
76-
77 win = GDK_WINDOW_XWINDOW(bm.win);
78- iconwin = GDK_WINDOW_XWINDOW(bm.iconwin);
79 XSetWMNormalHints(GDK_WINDOW_XDISPLAY(bm.win), win, &sizehints);
80
81 wmhints.initial_state = WithdrawnState;
82- wmhints.icon_window = iconwin;
83+ wmhints.icon_window = win;
84 wmhints.icon_x = 0;
85 wmhints.icon_y = 0;
86 wmhints.window_group = win;
87@@ -613,10 +594,8 @@
88
89 bm.pixmap = gdk_pixmap_create_from_xpm_d(bm.win, &(bm.mask), NULL, master_xpm);
90 gdk_window_shape_combine_mask(bm.win, bm.mask, 0, 0);
91- gdk_window_shape_combine_mask(bm.iconwin, bm.mask, 0, 0);
92
93 gdk_window_set_back_pixmap(bm.win, bm.pixmap, False);
94- gdk_window_set_back_pixmap(bm.iconwin, bm.pixmap, False);
95
96 #if 0
97 gdk_window_set_type_hint(bm.win, GDK_WINDOW_TYPE_HINT_DOCK);
98@@ -626,7 +605,6 @@
99 #endif
100
101 icon = gdk_pixmap_create_from_xpm_d(bm.win, NULL, NULL, icon_xpm);
102- gdk_window_set_icon(bm.win, bm.iconwin, icon, NULL);
103
104 gdk_window_show(bm.win);
105
106@@ -721,9 +699,6 @@
107 case 'l':
108 lock = 1;
109 break;
110- case 'b':
111- broken_wm = 1;
112- break;
113 case 'h':
114 default:
115 do_help();
116@@ -766,6 +741,5 @@
117 for (i = 0; i < NFLAMES; i++)
118 fprintf(stderr, "%d:%s ", i + 1, fire[i].text);
119 fprintf(stderr, "\n\t-l\t\t\tlock flame colour and monitor\n");
120- fprintf(stderr, "\t-b\t\t\tactivate broken window manager fix\n");
121 fprintf(stderr, "\t-h\t\t\tprints this help\n");
122 }
123Only in wmfire-1.2.4/src: wmfire.c~
124diff -ur wmfire-1.2.4.old/wmfire.1 wmfire-1.2.4/wmfire.1
125--- wmfire-1.2.4.old/wmfire.1 2017-04-23 14:26:58.449487117 -0400
126+++ wmfire-1.2.4/wmfire.1 2017-04-23 14:41:20.697186114 -0400
127@@ -8,7 +8,6 @@
128
129 .SH SYNOPSIS
130 .B wmfire
131-[-b]
132 [-c CPU]
133 [-f COLOUR]
134 [-F FILE]
135@@ -54,9 +53,6 @@
136
137 .SH OPTIONS
138 .TP
139-.B -b
140-Activate broken window manager fix (if grey box diplayed)
141-.TP
142 .B -c [0..3]
143 .br
144 Monitor SMP CPU number X