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
If the status bar script returns NUL as the first character through
stdin, spectrwm is prone to an out of boundary access. Depending on
the memory layout of the machine, it could turn into an OOB write.
The fix is simple: If the string is empty, do not further check for
newline character.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Match the type of the array to the `format` argument (32).
Could change the format to 16, but the value is documented to be a `CARD32`, so may as well use 32 bit input.
One xcb module, one header file: <xcb/xcb.h> should to be
included directly, instead of relying on other modules dragging
it in; on the other hand, it's okay to include just the top
level <xcb/xcb_util.h> instead of the three separate sub-headers.
[rk@rejii.com: skip xcb_util.h since it breaks xcb-util < 0.3.8]
closes#142
Fix transient windows blocking focus to respective main windows.
Fix override_redirect window focus issue.
Fix window borders when applications set focus.
Add more details to debug overlay.
Fixes#42
Change X11 window borders to drawn frames.
Add support for _NET_REQUEST_FRAME_EXTENTS.
Disable java_workaround.
We no longer need to spoof the LG3D non-reparenting window manager.
A dummy option is still present to prevent a startup exception.
Remove the use of BORDER() since it is no longer needed.
Fix move_ on tiled.
Add new debug_toggle bind for SWM_DEBUG.
Fix managing of mapped 'withdrawn' windows.
Wait for all x11 events to finish processing on shutdown_cleanup.
Buttons are specified as Button<n> (case sensitive) where n is 1 to 255.
Example:
bind[move] = MOD+Button8
Existing pointer actions are now available for bind[]:
focus - Focus window/region under pointer.
move - Move window with pointer while binding is pressed.
resize - Resize window with pointer while binding is pressed.
resize_centered - Same as resize but keep window centered.
Defaults:
bind[focus] = ANYMOD+REPLAY+Button1
bind[move] = MOD+Button1
bind[resize] = MOD+Button3
bind[resize_centered] = MOD+Shift+Button3
Button binds can be unbound the same as key binds:
Example:
bind[] = MOD+Button1 # unbind default move binding.
Add new special bind arguments:
ANYMOD
Binds all modifier combinations not handled by another binding.
REPLAY
Allows other programs to receive press/release events for bind.
Unavailable for move, resize and resize_centered.