1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-06-02 07:20:47 +00:00
Commit Graph

29 Commits

Author SHA1 Message Date
Tin
a591228b71
Modify CI and Nix flake
Code tweaks

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:32 -05:00
Tin
a4ac632db7
Fix X11 area enter & leave bug
Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:32 -05:00
Tin
bf900545c0
Debug X11 enter & leave events
Fix import derps

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:32 -05:00
Tin
5d5e235467
Cleanup display-x11 includes
Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:32 -05:00
Tin
f6a08f79b4
Tweaks
Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:32 -05:00
Tin
b1b7ae8b2c
Fix X11 build
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>
2023-11-19 14:16:32 -05:00
Tin
958bd1c525
Pass cursor move event to the script
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>
2023-11-19 14:16:31 -05:00
François Revol
c781b42f66 X11: Fix segfault on SIGINT
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.
2023-08-12 10:04:24 -04:00
François Revol
2bd267da31 Fix build without X11
On Haiku it complained about missing X11 header.
2023-08-08 08:40:51 -04:00
bi4k8
faba25d197 logging: define CRIT_ERR_FREE and simplify CRIT_ERR
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
2023-05-09 02:26:29 +00:00
bi4k8
dab87c5246
Fix memory leaks in X11 display backend (#1483)
* 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>
2023-03-31 12:54:20 -04:00
Brenden Matthews
a39015b7bd
Apply clang-format. 2023-02-24 08:43:15 -05:00
bi4k8
4a7bec5ba6
Premultiply background colors for X11 (#1421)
* 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>
2023-02-24 08:13:48 -05:00
bi4k8
a72902fa35 add Colour type and use it pervasively 2023-02-06 10:15:34 -05:00
Tin Švagelj
7fbdfbd4d4
Added mouse events to conky (#955)
* 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>
2023-01-01 12:39:57 -05:00
Brenden Matthews
76b0f049bc
Apply clang-format. 2022-12-24 09:44:03 -05:00
bi4k8
6b0c194515
x11: do not treat init failure as fatal with Wayland 2022-12-24 09:42:03 -05:00
bi4k8
1eb88aeb43
x11, imlib2: early-exit in some X functions if X is not available at runtime 2022-12-24 09:42:03 -05:00
bi4k8
2a4f5216c1
x11, gui: update display-x11.cc to account for some code moved into gui.h/gui.cc 2022-12-24 09:42:03 -05:00
Brenden Matthews
4622c0e336 Change assert in set_font to check w/ debug.
This resolves #1292.
2022-12-24 09:35:30 -05:00
Gene Carlson
fc8d778435 Replace atoi and atol with strtol (most files). 2022-09-25 18:24:03 -04:00
François Revol
7cf80d5948 Work around linker missing objects when building tests
Since we rely on a global object ctor to add a display output to the
list, it is not referenced from anywhere else, so does not get linked in
when building tests since most objects are pulled from a static library.

Another option would be to use --whole-archive to link to it.
2022-09-10 20:39:11 +02:00
François Revol
5b22723a3b Fix warnings
unused paramaters and (un)signed comparison mostly.
2022-09-10 20:39:11 +02:00
François Revol
e721119f04 Update copyright, authors.
Backported from 308f2cb8ea
2022-09-10 20:39:11 +02:00
François Revol
9a710fe17f display: fix logging 2022-09-10 20:39:11 +02:00
François Revol
568de329ef Move X11 font stuff to display-x11 2022-09-10 20:39:11 +02:00
François Revol
281097a2a5 move X11 stuff from conky.cc to display-x11
Still some things to sort out, but seems to work.

A lot of variables and calls had to be made non-static.
2022-09-10 20:39:11 +02:00
François Revol
fd683ee8ce display-*: Fix copyright 2022-09-10 20:39:11 +02:00
François Revol
17ceb82079 Initial stubbing of display backends
Hopefully this will lead the way to adding support for things like
Wayland and Haiku graphics, cf. #56.

We define a display_output_base class that display backends
can derive from to implement display-specific calls.
2022-09-10 20:39:11 +02:00