Cleanup modifiers
- This is preparation so that once Wayland adds support for these
they're not an alien X11 bitset.
- Removed ones that aren't actual modifiers.
Tidy up code
Signed-off-by: Tin <tin.svagelj@live.com>
Fix most issues with X11 event propagation.
Remove X11 code from mouse-events.cc/.h completely.
CMake:
Update toluapp cmake_minimum_required to stop it complaining during build.
Fix ConkyPlatformCheck.cmake not providing access to cairo, imlib2 and rsvg to Wayland.
Move BUILD_MOUSE_EVENTS includes under BUILD_GUI so they're not duplicated.
Signed-off-by: Tin <tin.svagelj@live.com>
Set initial window scale to 0 because wayland freezes the process when it's not >0.
Provide more information from `llua_mouse_hook` about why the callback is failing.
Prevent call to `llua_init` when provided lua_load script doesn't exist.
- This caused me a headache and now lua_L won't be initialized if the
script doesn't exist. This prevents a missing file from causing later
issues which might be harder to catch.
Feature gated X11 in mouse-events.h/.cc files.
Signed-off-by: Tin <tin.svagelj@live.com>
deinit_x11() was called too late, and it seems some libs like xinerama
and xcb-render add cleanup hooks but forget to remove them when they get
unloaded.
it's surprising to pass 2 nullptr arguments at most of the callsites of a logging function, so instead let callers explicitly state whether they have auxiliary data to free
this fixes tests that ended up comparing zero alpha to an unitialized alpha value
also improve reporting so that failing color comparison tests will print the color in hex
Co-authored-by: bi4k8 <bi4k8@github>
* display-x11: fix memory leaks
FcFini() was never being called, which meant FontConfig did not clean up its internal storage.
furthermore, restore a commented-out call to XftFontClose()
9acf0bb4c commented this call out, but it does not seem to cause any problems now on reload now
* feat: Move docs to website, rearrange bits (#1475)
* build(deps): bump actions/stale from 7 to 8 (#1472)
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)
---
updated-dependencies:
- dependency-name: actions/stale
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add fontconfig platform checks
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: bi4k8 <bi4k8@github>
Co-authored-by: Brenden Matthews <brenden@brndn.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brenden Matthews <github@brenden.brndn.io>
* specials: avoid duplicating color specials when both ncurses and a graphical output are enabled
* ncurses: fix black
we previously used the ncurses color as the id for its color pair, but this scheme needs to be shifted by one to avoid using the invalid 0 color-pair id for black (color id 0)
---------
Co-authored-by: bi4k8 <bi4k8@github>
* gradients: fix saturation calculation for 32-bit systems
this multiplication has two 512 scale factors as well as 360 and a color difference of up to 255. as such, it can overflow 32 bits, which results in an incorrect saturation value being computed
cast to uint64_t so we have enough bits to multiply without overflow
* gradients: fix luma calculation for 32-bit systems
this multiplication has 0-255 colors at 512 scale factor being multiplied by 10000 (summed across components), then multiplied by 360
this multiplication (360 * 10000 * 255 * 512) overflows a long on 32-bit systems, computing the wrong luma value
cast to uint64_t so we have enough bits to multiply without overflow
---------
Co-authored-by: bi4k8 <bi4k8@github>
* specials: comment all parser cases
* specials: scan_graph: early-return if args is null
* specials: fix logic in scan_graph
* tests: add scan_graph parsing test
* specials: separate command parsing from graph parsing
this simplifies the implementation of graph parsing and makes it less ambiguous to parse graphs in contexts where commands are not expected
* specials: tweak comments in scan_graph
* tests: update for scan_command separation
---------
Co-authored-by: bi4k8 <bi4k8@github>