* initialize XColor/XftColor
this does not change behavior, but avoids passing uninitialized data to X/Xft functions
* gui, x11: move have_argb_visual to x11 files
this variable only has meaning with respect to X11
* x11: clear have_argb_visual if the setting changes to false
otherwise, we may try to use colors with alpha when we no longer requested a 32-bit visual
* x11: premultiply alpha of background colors
* x11: clean up set_foreground_color a bit
---------
Co-authored-by: bi4k8 <bi4k8@github>
* gradient, colours: use 24-bit colour depth internally on Wayland
our Colour type assumes this anyway; lower colour depth should be handled by display backends
* core: restore gradient color computation
this was mistakenly disabled when moving to a unified Colour representation
* core, gradient: use Colour type
* tests: gradient: always test hsv/hcl
colour computations no longer depend on the display backends we compile with, so these can be tested unconditionally now
* gradients, specials: use Color type
this makes specials now accept color names as well as hex codes, and removes all notions of color depth from gradient calculations
---------
Co-authored-by: bi4k8 <bi4k8@github>
* Add libXdamage to flake.nix
* Add TYPE_UTILITY as above-all alternative to TYPE_OVERRIDE
* Click-through for TYPE_UTILITY
* Added libxfixes to MacOS CI workflow
* Disable building of XFIXES on MacOS
* Fix build for xinerama/xfixes on macos.
* Update Lua version check.
* Tidy this up.
* Fix BUILD_XFIXES on Linux
* Sigh, fix this.
---------
Co-authored-by: tranquillity-codes <dev@itycodes.org>
Co-authored-by: Brenden Matthews <brenden@brndn.io>
these settings are used for GUI builds as well as ncurses builds, and if we support colors in console and HTTP output, will be used there too
colors really are essential to what Conky does, even if some outputs don't support them, so it makes sense to build support for them unconditionally
this impacts only colors from which we compute Cairo colors, not the
rendered pixel buffers themselves, which were already and remain
ARGB32.
this makes Wayland and (24-bit) X11 use the same representation of
colors, fixing bugs when both backends were enabled.
we should still eventually switch to a backend-independent color
representation, because there are no guarantees of which pixel format
X11 will use (it isn't alway ARGB32) and backends like ncurses have
their own color representation; in most code we just hope the
unsigned long will be interpreted by the same backend as wrote it.
* Add mouse events.
Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
* Rename MOUSE_EVENTS flag to BUILD_MOUSE_EVENTS.
Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
* Update NORM_ERR func argument from std::string to char*
Because func was previously char* I forgot to update NORM_ERR function
argument to `func.c_str()` not that it's std::string.
Previously func was pointing to std::string memory that was freed at
assignment.
Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
Signed-off-by: Tin Svagelj <tin.svagelj@live.com>
these are implemented on both Wayland and X11, as stubs on the former. we need
to properly dispatch these based on the backend, but for now this resolves the
conflict