Bump to 50ad171.

remove workaround for a crash with color emojis on some systems, now fixed in libXft 2.3.5

https://gitlab.freedesktop.org/xorg/lib/libxft/-/blob/libXft-2.3.5/NEWS

bump version to 6.4

Ref.
https://git.suckless.org/dwm/commit/970f37697358574e127019eb0ee2f5725ec05ce0.html
https://git.suckless.org/dwm/commit/50ad171eea9db5ccb36fce2592e047c3282975ff.html

Consequently the color emoji patch has been inverted into no color emoji, keeping the workaround in the code base for those that are on systems with older versions of the Xft library.
pull/253/merge
bakkeby 2 years ago
parent 1ac17a4937
commit 4912e3129a

@ -1,4 +1,4 @@
This dwm 6.3 (c2b748e, 2022-08-26) side project has a different take on dwm patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more. Due to the complexity of some of the patches dwm-flexipatch has diverged from mainstream dwm by making some core patches non-optional for maintenance reasons. For the classic dwm-flexipatch build refer to branch [dwm-flexipatch-1.0](https://github.com/bakkeby/dwm-flexipatch/tree/dwm-flexipatch-1.0).
This dwm 6.4 (50ad171, 2022-10-04) side project has a different take on dwm patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more. Due to the complexity of some of the patches dwm-flexipatch has diverged from mainstream dwm by making some core patches non-optional for maintenance reasons. For the classic dwm-flexipatch build refer to branch [dwm-flexipatch-1.0](https://github.com/bakkeby/dwm-flexipatch/tree/dwm-flexipatch-1.0).
For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/dwm-flexipatch/blob/master/patches.def.h):
```c
@ -310,11 +310,11 @@ Browsing patches? There is a [map of patches](https://coggle.it/diagram/X9IiSSM6
- [colorbar](https://dwm.suckless.org/patches/colorbar/)
- lets you change the foreground and background color of every statusbar element
- color_emoji
- enables color emoji in dmenu by removing a workaround for a BadLength error in the Xft
library when color glyphs are used
- enabling this will crash dwm on encountering such glyphs unless you also have an updated
Xft library that can handle them
- ~color_emoji~
- ~enables color emoji in dmenu by removing a workaround for a BadLength error in the Xft~
~library when color glyphs are used~
- ~enabling this will crash dwm on encountering such glyphs unless you also have an updated~
~Xft library that can handle them~
- [combo](https://dwm.suckless.org/patches/combo/)
- allows you to select multiple tags by pressing all the right keys as a combo, e.g. hold MOD

@ -1,5 +1,5 @@
# dwm version
VERSION = 6.3
VERSION = 6.4
# Customize below to fit your system

@ -237,7 +237,7 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
die("no font specified.");
}
#if !BAR_COLOR_EMOJI_PATCH
#if BAR_NO_COLOR_EMOJI_PATCH
/* Do not allow using color fonts. This is a workaround for a BadLength
* error from Xft with color glyphs. Modelled on the Xterm workaround. See
* https://bugzilla.redhat.com/show_bug.cgi?id=1498269
@ -250,7 +250,7 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
XftFontClose(drw->dpy, xfont);
return NULL;
}
#endif // BAR_COLOR_EMOJI_PATCH
#endif // BAR_NO_COLOR_EMOJI_PATCH
font = ecalloc(1, sizeof(Fnt));
font->xfont = xfont;
@ -592,7 +592,9 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp
fcpattern = FcPatternDuplicate(drw->fonts->pattern);
FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
#if BAR_NO_COLOR_EMOJI_PATCH
FcPatternAddBool(fcpattern, FC_COLOR, FcFalse);
#endif // BAR_NO_COLOR_EMOJI_PATCH
FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
FcDefaultSubstitute(fcpattern);

@ -299,14 +299,6 @@
*/
#define BAR_CLIENTINDICATOR_PATCH N/A
/* This patch enables color emoji in dwm by removing a workaround for a BadLength error
* in the Xft library when color glyphs are used.
* To enable this you will need an updated Xft library that can handle color glyphs otherwise
* dwm will crash on encountering such characters. Note that you will also need a font that
* provides color emojis for this to work.
*/
#define BAR_COLOR_EMOJI_PATCH 0
/* Updates the position of dmenu to match that of the bar. I.e. if topbar is 0 then dmenu
* will appear at the bottom and if 1 then dmenu will appear at the top.
* https://dwm.suckless.org/patches/dmenumatchtop
@ -359,6 +351,12 @@
*/
#define BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH 0
/* This patch adds back in the workaround for a BadLength error in the Xft library when color
* glyphs are used. This is for systems that do not have an updated version of the Xft library
* (or generally prefer monochrome fonts).
*/
#define BAR_NO_COLOR_EMOJI_PATCH 0
/* This patch adds vertical and horizontal space between the statusbar and the edge of the screen.
* https://dwm.suckless.org/patches/barpadding/
*/

Loading…
Cancel
Save