bb2e7222 — Hiltjo Posthuma 1 year, 26 days ago upstream
dwm.1: fix wrong text in man page
f04cac6d — Alex Flierl 1 year, 1 month ago
Fix memory leaks in drw

The function drw_fontset_free in drw.c was never called.
dwm crashes when opening 50+ clients (tile layout)

Many users new to dwm find themselves caught out by being kicked out to the login manager (dwm crashing) when they open 50+ clients for demonstration purposes. The number of clients reported varies depending on the resolution of the monitor.

The cause of this is due to how the default tile layout calculates the height of the next client based on the position of the previous client. Because clients have a minimum size the (ty) position can exceed that of the window height, resulting in (m->wh - ty) becoming negative. The negative height stored as an unsigned int results in a very large height ultimately resulting in dwm crashing.

This patch adds safeguards to prevent the ty and my positions from exceeding that of the window height.
drawbar: Don't shadow sw global

This jarred me a bit while reading the code, since "sw" usually refers
to the global screen geometry, but in drawbar() only it refers to
text-related geometry. Renaming it makes it more obvious that these are
not related.
getatomprop: Add forward declaration

No functional changes, but for every other function we have a forward
declaration here. getatomprop should be no exception.
setmfact: Unify bounds for compile-time and runtime mfact

There are two places that mfact can be set:

- In the mfact global, which is defined at compile time and passed
  into m->mfact during monitor setup. No bounds checks are performed,
  but the comment alongside it says that valid values are [0.05..0.95]:

      static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */

- By setmfact, which adjusts m->mfact at runtime. It also does some
  minimum and maximum bounds checks, allowing [0.1..0.9]. Values outside
  of that range are ignored, and mfact is not adjusted.

These different thresholds mean that one cannot setmfact 0.95 or 0.05,
despite the comment above that lists the legal range for mfact.

Clarify this by enforcing the same bounds in setmfact at runtime as
those listed for mfact at compile time.
c82db690 — Hiltjo Posthuma 1 year, 4 months ago
config.mk: fix POSIX_C_SOURCE macro for feature test for snprintf()

The feature test was incorrect:

"The value 2 or greater additionally exposes definitions for POSIX.2-1992."

A higher value is needed (atleast 1995):

FreeBSD feature test macro:
https://github.com/freebsd/freebsd/blob/master/include/stdio.h line 297

This was already fixed in dmenu.

This fixes a warning on FreeBSD, reported by Plasmoduck on IRC, thanks.
cb3f58ad — Anselm R Garbe 2 years ago
Prepare 6.2 release.
b69c870a — Hiltjo Posthuma 3 years ago
pledge: add rpath promise for the ugly Xft font fallback
e78b4a92 — Hiltjo Posthuma 3 years ago
Makefile: just show the compiler output

Don't be fancy and just show the actual output so debugging is simpler.
3cd4023f — Klemens Nanni 3 years ago
Do not strip at link stage

Building with debug symbols is worthless unless LDFLAGS are manually
adjusted as well.
f40f86fa — Klemens Nanni 3 years ago
Pledge on OpenBSD
c3a2e016 — Hiltjo Posthuma 3 years ago
config.def.h: ClkTagBar missing from comment

by Christopher Drelich <cd@cdrakka.com>

Patch was mangled on the ML, also adjusted the order to be the same as
the enum in dwm.c
c8e94791 — Christopher Drelich 3 years ago
Function declarations in correct order.

In dwm.c function declarations are in alphabetical order except for
updategeom(). There doesn't appear to be any reason for this, so this
patch corrects that, and now all function declarations are in
alphabetical order.
10dfa658 — Hiltjo Posthuma 3 years ago
remove old TODO and BUGS entries

the bug in the dwm man page is an (ancient) Java issue.

Thanks David and quinq for the patches and feedback!
3bd8466e — Hiltjo Posthuma 3 years ago
update README: remove mentioning the old dextra repo

Thanks Christopher Drelich <cd@cdrakka.com>
76c8c16d — Christopher Drelich 3 years ago
All functions in alphabetical order except for this one.
3cb34830 — Christopher Drelich 3 years ago
ColBorder has been moved to the enum with ColFg and ColBg.
db223600 — Hiltjo Posthuma 3 years ago
dont NUL terminate _NET_WM_NAME

Reported by Kernc, thanks!

"This makes a particular program that uses libwnck [1] fail after:

    Wnck-WARNING **: Property _NET_WM_NAME contained invalid UTF-8

in this code [2] because the returned string contains a '\0' and the
documentation for g_utf8_validate() [3] explicitly states that when
string length is provided, no nul bytes are allowed."

It is not entirely clear it is incorrect, other WM's seem to not
NUL terminate it either though.
3756f7f6 — Hiltjo Posthuma 3 years ago
sync dmenu drw.{c,h} code: use Clr* (was Scm)