Squashed from:
implement unpinning
add docs about unpinning
add pinning to us keymap
disable debugging
initialize do_pin with true
Otherwise the workspaces won't get pinned the first time
only pin if there is a window on the workspace
do not require warp focus
do not require other workspace
suppress unused param warning
make pinning work without clamping, preparation for manual pinning
disable debug
only pin if auto pin is activated
remove unused variable
init pinning for screens on start
revert whitespace change
fix the formatting
ICCCM permits clients to change any property on its withdrawn windows.
If a client maps a withdrawn window again, the window manager should
treat it as new.
XftTextExtentsUtf8 computes the pixel extents and stores them in a
XGlyphInfo data type. The true "width" of a Xft glyph is found in the
xOff member of the latter structure.
This fixes the (dis)appearing space when switching workspace (#264).
line 1785 - Wrong type
line 2486 - Division by zero
line 2575 - Uninitialized argument value
line 2583 - Uninitialized argument value
line 2595 - Uninitialized argument value
line 2597 - Uninitialized argument value
line 3468 - Wrong type
line 3730 - Dereference of null pointer
line 6065 - Result of operation is garbage or undefined
line 9374 - Wrong type
line 12446 - Possible null pointer dereference
New conf search order:
1) $XDG_CONFIG_HOME/spectrwm/spectrwm.conf
2) ~/.config/spectrwm/spectrwm.conf
(if $XDG_CONFIG_HOME is either not set or empty)
3) ~/.spectrwm.conf
4) $XDG_CONFIG_DIRS/spectrwm/spectrwm.conf
(each colon-separated directory in $XDG_CONFIG_DIRS)
5) /etc/xdg/spectrwm/spectrwm.conf
(if $XDG_CONFIG_DIRS is either not set or empty)
6) /etc/spectrwm.conf
In get_binding_keycode() a uint8_t loop variable was incremented in a
for loop. The variable would overflow right before the loop's
condition was met. Therefore the loop would never terminate.
To avoid the infinite loop the condition has to be checked before the
increment operation and not afterwards.
xcb_key_symbols_get_keycode() returns a list of keycodes that is ordered
by keycode value instead of keyboard layout order. If a keysym resolves
to multiple keycodes, the first keycode in the returned array may be from
the wrong layout.
For example, if the current keymap has two layouts: 'us, us(dvorak)', 'p'
will resolve to keycode 27 of the secondary 'dvorak' layout instead of
keycode 33 of the primary 'us' layout.
Instead of using xcb_key_symbols_get_keycode() to resolve keysyms to
keycodes, search each keysym column in the key map until there is a hit.
Setting `disable_border = always` removes border from lone tiled
windows, regardless of the bar being enabled/disabled. This is an
addition to an existing feature, and does not change existing behaviour.
On the musl libc, autorun, layout and workspace name settings were
always rejected as invalid. As it turns out, parsing those was relying
on sscanf incorrectly matching %Nc as long as there is at least one
character. This is fixed by matching only the initial part of the string
via sscanf and skipping ahead by the amount of bytes consumed. This also
avoids unnecessary zeroing, copying and possible implicit truncation.
Relevant glibc bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=12701