1 This patch comes from Debian and was modified by Kei Kebreau <kei@openmailbox.org>.
2 Link: https://anonscm.debian.org/cgit/pkg-wmaker/wmfire.git/plain/debian/patches/gdk_updates.patch?h=debian/1.2.4-2&id=a272234fc5eecdbfc469adb12133196bc62f3059
4 Description: 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.
9 This also removes the need for the "broken window manager" fix, so we remove it
10 and all references to it.
11 Author: Doug Torrance <dtorrance@piedmont.edu>
13 diff -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
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 */
30 /******************************************/
35 /* Draw the rgb buffer to screen */
37 - gdk_draw_rgb_image(bm.iconwin, bm.gc, 4, 4, XMAX, YMAX, GDK_RGB_DITHER_NONE, bm.rgb, XMAX * 3);
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);
47 #define MASK GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_HINT_MASK
50 - GdkWindowAttr attri;
57 attr.wmclass_class = "wmfire";
58 attr.window_type = GDK_WINDOW_TOPLEVEL;
60 - /* Make a copy for the iconwin - parameters are the same */
61 - memcpy(&attri, &attr, sizeof (GdkWindowAttr));
62 - attri.window_type = GDK_WINDOW_CHILD;
64 sizehints.flags = USSize;
66 sizehints.height = 64;
71 - bm.iconwin = gdk_window_new(bm.win, &attri, GDK_WA_TITLE | GDK_WA_WMCLASS);
73 - fprintf(stderr, "FATAL: Cannot make icon window\n");
77 win = GDK_WINDOW_XWINDOW(bm.win);
78 - iconwin = GDK_WINDOW_XWINDOW(bm.iconwin);
79 XSetWMNormalHints(GDK_WINDOW_XDISPLAY(bm.win), win, &sizehints);
81 wmhints.initial_state = WithdrawnState;
82 - wmhints.icon_window = iconwin;
83 + wmhints.icon_window = win;
86 wmhints.window_group = win;
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);
93 gdk_window_set_back_pixmap(bm.win, bm.pixmap, False);
94 - gdk_window_set_back_pixmap(bm.iconwin, bm.pixmap, False);
97 gdk_window_set_type_hint(bm.win, GDK_WINDOW_TYPE_HINT_DOCK);
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);
104 gdk_window_show(bm.win);
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");
123 Only in wmfire-1.2.4/src: wmfire.c~
124 diff -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
140 -Activate broken window manager fix (if grey box diplayed)
144 Monitor SMP CPU number X