libsl, branch HEADshared code master of various suckless projects
2a51471e84828c60e488a2e1139a187816904f6f2025-09-29T16:48:41Z2025-09-29T16:48:41Zdrw.c: drw_scm_free: call free insideHiltjo Posthumahiltjo@codemadness.orgcommit 2a51471e84828c60e488a2e1139a187816904f6f
parent b82ef25d40d29b93d4f9a2fd2a646670f5ea6fd6
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 29 Sep 2025 18:48:41 +0200
drw.c: drw_scm_free: call free inside
Because drw_scm_create() allocates it.
b82ef25d40d29b93d4f9a2fd2a646670f5ea6fd62025-09-27T10:27:20Z2025-09-27T10:27:20Zadd x11 "backend"Hiltjo Posthumahiltjo@codemadness.orgcommit b82ef25d40d29b93d4f9a2fd2a646670f5ea6fd6
parent e8224f0f3dea1c6945bb283bee1d3eb2f981597b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Sep 2025 12:27:20 +0200
add x11 "backend"
This code is based of older dwm and dmenu versions which didn't use Xft with
some modifications for the newer interface.
It was one of the goals of libsl: to support multiple backends for X11.
e8224f0f3dea1c6945bb283bee1d3eb2f981597b2025-09-27T10:26:22Z2025-09-27T10:26:22Zseparate directory for xftHiltjo Posthumahiltjo@codemadness.orgcommit e8224f0f3dea1c6945bb283bee1d3eb2f981597b
parent d616c471691af8ec05021c907d774ed8f14ec486
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Sep 2025 12:26:22 +0200
separate directory for xft
d616c471691af8ec05021c907d774ed8f14ec4862025-09-27T10:09:58Z2025-09-27T10:09:58Zadd drw_clr_free and drw_scm_free for freeing schemes and colorsHiltjo Posthumahiltjo@codemadness.orgcommit d616c471691af8ec05021c907d774ed8f14ec486
parent 206fe9b99f01604b10e6d8e5ab52a035712476f0
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Sep 2025 12:09:58 +0200
add drw_clr_free and drw_scm_free for freeing schemes and colors
Other small cleanup:
- Change type to Clr (typedef to XftColor here, for X11 version it is XColor).
- Remove misleading comment.
206fe9b99f01604b10e6d8e5ab52a035712476f02024-10-30T12:03:56Z2024-10-30T12:03:56ZAvoid unsigned integer underflow in drw_text()Hiltjo Posthumahiltjo@codemadness.orgcommit 206fe9b99f01604b10e6d8e5ab52a035712476f0
parent 93a43d03b00ddf8757636b69ad24d2f5de3336da
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 30 Oct 2024 13:03:56 +0100
Avoid unsigned integer underflow in drw_text()
Patch by Raymond Cole <rc@wolog.xyz>, thanks
93a43d03b00ddf8757636b69ad24d2f5de3336da2024-10-27T19:10:30Z2024-10-27T19:10:30Zutil.c: output function might override errno and thus affect perror()Hiltjo Posthumahiltjo@codemadness.orgcommit 93a43d03b00ddf8757636b69ad24d2f5de3336da
parent ecd9d212f6a3947821c7c6beb5014efd5a2e49ec
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 27 Oct 2024 20:10:30 +0100
util.c: output function might override errno and thus affect perror()
Original patch by Raymond Cole with some modifications, thanks!
ecd9d212f6a3947821c7c6beb5014efd5a2e49ec2024-10-05T11:06:55Z2024-10-05T11:06:55Zsync drw.{c,h} from dmenuHiltjo Posthumahiltjo@codemadness.orgcommit ecd9d212f6a3947821c7c6beb5014efd5a2e49ec
parent b77eca5e5707d6c59647eb2525610d00c0228767
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 5 Oct 2024 13:06:55 +0200
sync drw.{c,h} from dmenu
- drw: minor improvement to the nomatches cache
- overhaul utf8decoding and render invalid utf8 sequences as U+FFFD.
Thanks NRK for these improvements!
b77eca5e5707d6c59647eb2525610d00c02287672022-09-16T21:07:01Z2022-09-17T13:32:55Zremove workaround for a crash with color emojis on some systems, now fixed in libXft 2.3.5Hiltjo Posthumahiltjo@codemadness.orgcommit b77eca5e5707d6c59647eb2525610d00c0228767
parent 32fa3f5a65103864190c2e0bf4dc195b79b00a65
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 16 Sep 2022 23:07:01 +0200
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
32fa3f5a65103864190c2e0bf4dc195b79b00a652022-08-08T04:00:36Z2022-08-08T08:41:15Zcode-style: sort function alphabeticallyexplosion-mentalexplosion0mental@gmail.comcommit 32fa3f5a65103864190c2e0bf4dc195b79b00a65
parent a8e80c1c5ec435323692b51369901f83c2ffa1b8
Author: explosion-mental <explosion0mental@gmail.com>
Date: Sun, 7 Aug 2022 23:00:36 -0500
code-style: sort function alphabetically
die should be before ecalloc
as defined in util.h.
Also, move a bracket `{` below the function(arguments)
a8e80c1c5ec435323692b51369901f83c2ffa1b82022-05-10T17:08:20Z2022-05-10T17:08:20Zsync latest drw.{c,h} changes from dmenuHiltjo Posthumahiltjo@codemadness.orgcommit a8e80c1c5ec435323692b51369901f83c2ffa1b8
parent e55f29636da9cfccb2ab9b075b628de857446135
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 10 May 2022 19:08:20 +0200
sync latest drw.{c,h} changes from dmenu
e55f29636da9cfccb2ab9b075b628de8574461352021-08-20T21:12:22Z2021-08-20T21:12:22Zsync fix to free the fontsetHiltjo Posthumahiltjo@codemadness.orgcommit e55f29636da9cfccb2ab9b075b628de857446135
parent 86f1eafc2d02340e202c799a2b0db4fae9519f4e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 20 Aug 2021 23:12:22 +0200
sync fix to free the fontset
86f1eafc2d02340e202c799a2b0db4fae9519f4e2021-08-20T21:10:12Z2021-08-20T21:10:12ZRevert "sync drw.c: improve speed of large fonts and free fontset"Hiltjo Posthumahiltjo@codemadness.orgcommit 86f1eafc2d02340e202c799a2b0db4fae9519f4e
parent 1faf5f475161b2362b077be9f3ddde84a95514ce
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 20 Aug 2021 23:10:12 +0200
Revert "sync drw.c: improve speed of large fonts and free fontset"
This reverts commit 1faf5f475161b2362b077be9f3ddde84a95514ce.
1faf5f475161b2362b077be9f3ddde84a95514ce2021-08-09T16:26:02Z2021-08-09T16:26:02Zsync drw.c: improve speed of large fonts and free fontsetHiltjo Posthumahiltjo@codemadness.orgcommit 1faf5f475161b2362b077be9f3ddde84a95514ce
parent ded6077af12634bd0fb0cd1f31bf2995bcf800ca
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 9 Aug 2021 18:26:02 +0200
sync drw.c: improve speed of large fonts and free fontset
ded6077af12634bd0fb0cd1f31bf2995bcf800ca2019-09-26T21:00:22Z2019-09-26T21:00:22Zupdate LICENSE to actual authors and contributors for drw codeHiltjo Posthumahiltjo@codemadness.orgcommit ded6077af12634bd0fb0cd1f31bf2995bcf800ca
parent 96e040538ee37ebcd1b0ade913280838385634b8
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 26 Sep 2019 23:00:22 +0200
update LICENSE to actual authors and contributors for drw code
96e040538ee37ebcd1b0ade913280838385634b82019-09-26T20:57:15Z2019-09-26T20:57:15Zutil.h: add ecalloc from util.c and fix die() argument declarationHiltjo Posthumahiltjo@codemadness.orgcommit 96e040538ee37ebcd1b0ade913280838385634b8
parent 53ebcb48c6b12882c6dbe352ee43c96b2fb01b84
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 26 Sep 2019 22:57:15 +0200
util.h: add ecalloc from util.c and fix die() argument declaration
53ebcb48c6b12882c6dbe352ee43c96b2fb01b842019-01-16T21:51:30Z2019-02-02T12:37:06ZWorkaround Xft BadLength X errorThomas Spurdenthomas@spurden.namecommit 53ebcb48c6b12882c6dbe352ee43c96b2fb01b84
parent e1132a979e39d6cdb8c34ea5496c901a5b8c2d79
Author: Thomas Spurden <thomas@spurden.name>
Date: Wed, 16 Jan 2019 21:51:30 +0000
Workaround Xft BadLength X error
Modify the fontconfig pattern to prefer non-color fonts, and discard any
selected font which has the color flag set. Using these fonts with Xft is just
going to generate a BadLength X error.
e1132a979e39d6cdb8c34ea5496c901a5b8c2d792016-11-05T10:44:30Z2016-11-05T10:44:30Zsync drw.c, drw.h and arg.h from dmenuHiltjo Posthumahiltjo@codemadness.orgcommit e1132a979e39d6cdb8c34ea5496c901a5b8c2d79
parent 4ef363a6c7f0265024845e151a5fe7dcaefb3ee1
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 5 Nov 2016 11:44:30 +0100
sync drw.c, drw.h and arg.h from dmenu
4ef363a6c7f0265024845e151a5fe7dcaefb3ee12015-03-06T04:28:49Z2015-03-13T20:44:52ZAdd Xft and follback-fonts support to graphics libEric Pruitteric.pruitt@gmail.comcommit 4ef363a6c7f0265024845e151a5fe7dcaefb3ee1
parent 57b9b1642a4e17ba794029ee37568aa5564e5983
Author: Eric Pruitt <eric.pruitt@gmail.com>
Date: Thu, 5 Mar 2015 20:28:49 -0800
Add Xft and follback-fonts support to graphics lib
57b9b1642a4e17ba794029ee37568aa5564e59832014-08-26T05:10:34Z2014-08-26T05:13:11Zadded missing LICENSE fileAnselm R Garbeanselm@garbe.uscommit 57b9b1642a4e17ba794029ee37568aa5564e5983
parent 4970af0a78c1b28ff0cc8bfd36ac7cc03ad208f3
Author: Anselm R Garbe <anselm@garbe.us>
Date: Tue, 26 Aug 2014 07:10:34 +0200
added missing LICENSE file
4970af0a78c1b28ff0cc8bfd36ac7cc03ad208f32013-06-23T19:54:02Z2013-06-23T19:54:02Zapplied Jochen's drw_text patch, thanksAnselm R Garbeanselm@garbe.uscommit 4970af0a78c1b28ff0cc8bfd36ac7cc03ad208f3
parent 96fe0f030abeb962b07ad4fc390ca8ad926bb9aa
Author: Anselm R Garbe <anselm@garbe.us>
Date: Sun, 23 Jun 2013 21:54:02 +0200
applied Jochen's drw_text patch, thanks
96fe0f030abeb962b07ad4fc390ca8ad926bb9aa2013-06-19T17:36:54Z2013-06-19T17:36:54Zincorporated recent drw changesAnselm R Garbeanselm@garbe.uscommit 96fe0f030abeb962b07ad4fc390ca8ad926bb9aa
parent 397537761c5a6303bba45c273327786570fc4a2e
Author: Anselm R Garbe <anselm@garbe.us>
Date: Wed, 19 Jun 2013 19:36:54 +0200
incorporated recent drw changes
397537761c5a6303bba45c273327786570fc4a2e2013-06-16T13:21:30Z2013-06-16T13:21:30Zadded new drw changes of dwmAnselm R Garbeanselm@garbe.uscommit 397537761c5a6303bba45c273327786570fc4a2e
parent bd41463268c70fcbec5422aa30c68d126418d59a
Author: Anselm R Garbe <anselm@garbe.us>
Date: Sun, 16 Jun 2013 15:21:30 +0200
added new drw changes of dwm
bd41463268c70fcbec5422aa30c68d126418d59a2013-04-27T18:56:37Z2013-04-27T18:56:37Zapplied changes suggested by Lorenzo Cogotti, thanksAnselm R Garbeanselm@garbe.uscommit bd41463268c70fcbec5422aa30c68d126418d59a
parent bfdec1e2d45497b6d53e366aa31e063214829023
Author: Anselm R Garbe <anselm@garbe.us>
Date: Sat, 27 Apr 2013 20:56:37 +0200
applied changes suggested by Lorenzo Cogotti, thanks
bfdec1e2d45497b6d53e366aa31e0632148290232012-12-10T09:04:58Z2012-12-10T09:04:58Zinitial commitAnselm R Garbeanselm@garbe.uscommit bfdec1e2d45497b6d53e366aa31e063214829023
Author: Anselm R Garbe <anselm@garbe.us>
Date: Mon, 10 Dec 2012 10:04:58 +0100
initial commit