* clang-format: bring back ForeachMacros
ForeachMacros was disabled in 4211274fcd
due to the breakage of include/queue.h. The currently used version,
clang-format-6.0 doesn't break it.
* Add curly braces
Co-authored-by: Orestis Floros <orestisflo@gmail.com>
Fixes for undefined behaviour on signed shift
Change literal 1 to unsigned to allow safe bitshift of 31.
Caught by cppcheck.
Make 0xFF unsigned to prevent a left shift into signed bit.
Spotted by @orestisf1993
These are the changes that clang-format 6.0.1 makes to the codebase that
clang-format-3.8 doesn't change back.
Useful for those that use a more recent version of clang-format in their
local machines.
Including config.h is necessary to get e.g. the _GNU_SOURCE define and
any other definitions that autoconf declares. Hence, config.h needs to
be included as the first header in each file.
This is done either via:
1. Including "common.h" (i3bar)
2. Including "libi3.h"
3. Including "all.h" (i3)
4. Including <config.h> directly
Also remove now-unused I3__FILE__, add copyright/license statement
where missing and switch include/all.h to #pragma once.
Commit 287a0b4 introduced a segfault when validating the i3 config
as the root_screen will not be set in this case, causing a null
pointer dereference.
fixes#2144
Re-introduce fully-fledged get_colorpixel function, which enables arbitrary
color depths for the display. The previous code is kept as an optimization for
the case of a true color display, where a X11 roundtrip is unnecessary.
We pass alpha channel information to the current text drawing code
and use it if it is available. The previous behavior of using full
opacity for RGB format colors is preserved.
You need to specify the --enable-32bit-visual flag when starting i3. This is
done because everything feels sluggish on my system when using a 32 bit visual
instead of a 24 bit visual. Fast > fancy.