1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-06 22:18:36 +00:00

134 Commits

Author SHA1 Message Date
Marc Aldorasi
9f830224e5 Restore previous strut behavior 2024-06-10 15:41:05 -04:00
Fernando
682db0c4df Fix build with specific option combination.
With some option combination the code to be compiled has not been updated with
regards to the changes in conky::rec, i.e get_height() becomes height() and
get_width() becomes width().
2024-05-20 14:41:21 -04:00
Fernando Apesteguía
c635df8689
Fix build with specific option combination (#1918)
Fixes incorrect member accessing left behind after #1910.
2024-05-15 18:18:11 +00:00
Tin Švagelj
2d50767216
Remove _member_access from geometry (#1910)
* It was difficult/too costly ensuring temporary this was correct when vecs contained in rects were accessed directly.
* Added semantics to `rect` and some utility functions.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-05-13 20:08:27 +00:00
Tin Švagelj
6bf383cf78
Introduce geometry primitives (#1862)
* Introduce geometry primitives based on Vc
* Apply geometry primitives to some existing code

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-05-07 20:02:47 +00:00
Tin Švagelj
7b44b2a27b
Update DPI when changed in resource manager (#1878)
* Update xft_dpi on property change
  * Added fallback calculation when Xft is disabled.
* Removed display_width/height and replaced it with workarea for
  consistency.
* Make DPI work on X11 when Xft is disabled
* Make find_subwindow more specific, rename it

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-05-01 14:55:05 +00:00
Tin Švagelj
384bbed0df
Use _NET_VIRTUAL_ROOTS for querying virtual roots (#1875)
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-30 20:59:28 +00:00
Tin Švagelj
71c4e6ea52
Fix bad query_x11_windows early returns (#1864)
* Fix bad early returns
* Prevent fallback tree traversal from propagation code

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-26 00:09:20 +00:00
Tin Švagelj
c5ee70177c
set_struts improvements (#1849)
Simplify and speed up strut code

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-24 13:56:28 +00:00
Tin Švagelj
6adf6b9dd4
Cleanup build flags, global namespace and includes (#1841)
- Separated displays so they don't have to all be included in build even when the features are disabled.
- Removed weird linker magic for display init and replaced it with straightforward (and faster) template functions that behave the same.
  - Replaced `disabled_display_output` classes with log messages.
- Add explicit compiler errors when feature dependent headers get included where they shouldn't (wl, x11).
- Switch BUILD_MOUSE_EVENTS dependency from OWN_WINDOW to BUILD_X11.
- Other minor improvements to some existing code which shouldn't affect behavior.
- Improve documentation.
- Remove X11 from unrelated headers.
  - This reaches 0% unneeded X11 polution in the sources.
  - Reenabled parts of window_type which would work in Wayland.
  - Remove unneeded guards.
- Display files are now no longer compiled if their features are disabled.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-23 21:15:37 +00:00
Tin Švagelj
d815f9aa49
Create missing atom for query (#1834)
I'm assuming sending None Atom in the request will cause an error.
I defined those properties on my platform so that's why the function
didn't fail.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-17 19:40:01 +00:00
Tin Švagelj
f4b3229fc3
Exclusive XInput event handling (#1821)
- This commit changes mouse events to use XInput exclusively if it's not disabled.
- Added support for changing valuator properties through device configuration (see wiki for details).
- Fixed and cleaned up a lot of previously added code.
2024-04-17 02:04:14 +00:00
Tin Švagelj
c2dfa29f33
Refactor x11 event handling (#1819)
Move event handling code into separate functions.
2024-04-12 14:46:39 +00:00
Tin Švagelj
e4213024e4
Set propagate to True, to not propagate by default (#1809)
XSendEvent propagate bool argument is actually "don't force propagation", so
True value means the event will only get propagated if it's not handled,
and False means the event will _always_ get propagated.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-10 17:35:30 +00:00
Tin Švagelj
9424ab8ca5
Fix event propagation on Openbox
Events now get correctly propagated to a window (or root if none) behind conky.
This was a necessary change to handle cases such as MATE+caja where caja
is used between conky and background to show icons and desktop menu.

* Don't change input focus on propagation

Could cause input focus flickering, so I'm leaving it up to WMs to manage focus.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-09 12:28:26 +00:00
Tin Švagelj
407769d03d
Skip propagation of non-input events
Fixes #1771

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-04-04 11:51:48 +00:00
Brenden Matthews
8efb3f0e0e Fix naming conflict for Imlib2.h 2024-03-11 16:08:32 -04:00
Tin Švagelj
27d64fe834 Fix buffer overflow on X11 error bug
Skip descendant checking if cursor over desktop in query_x11_window_at_pos.
Simplify and correct check for whether cursor is over conky.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
2024-02-25 08:13:45 -05:00
Brenden Matthews
8dae420bc8 Fix bad new/delete usage 2024-02-23 08:56:07 -05:00
Brenden Matthews
35357e437c Update copyright 2024-02-22 08:53:35 -05:00
Brenden Matthews
2fbe79a65c
One more byte for error 2023-11-19 14:16:34 -05:00
Tin
b9e7fa0574
Namespace mouse-events.cc/.h
Cleanup number namespaces so they use cstdint types instead of stdint.h
types. Latter could've caused some issues in the future.

Simplify valuator mask checking expression.

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:34 -05:00
Tin
1b45d95e26
Use core X11 events when Xinput is enabled
There was no way to propagate move events otherwise

Also, clang-format decided to kick in and reformat Xinput related
code...

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:33 -05:00
Tin
20f9f60c6a
Fix build & cleanup
Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:33 -05:00
Tin
cbebe44707
Fix DependentOptions splitting arguments on spaces
Fix broken x11.cc

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:33 -05:00
Tin
f6d42c5a69
Fix issues building without BUILD_ARGB flag
Fix half-saved change in display-wayland.cc

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:33 -05:00
Tin
4936c7492c
Provide a notice when build options get disabled
Reformat files and hope it invalidates CI cache :)

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:33 -05:00
Tin
7a3020fad5
Fix CMake script
Cleanup debug statements

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:33 -05:00
Tin
916be9812b
Handle movement through XInput if enabled
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>
2023-11-19 14:16:33 -05:00
Tin
a3fc61b078
Cleanup focus handling code on propagation
Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:33 -05:00
Tin
965d7dc0a4
Simplify cursor checking
Additional tweaks and docs improvements

Signed-off-by: Tin <tin.svagelj@live.com>
2023-11-19 14:16:33 -05:00
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
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
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
tranquillity-codes
4b8d5eb34a
Add an above-all overlay mode for own_window_type, utility (#1402)
* 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>
2023-02-16 22:03:14 -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
9bf55cfbfd Drop this message. 2022-12-26 13:21:40 -05:00
Brenden Matthews
c28ad36c4c This is superfluous. 2022-12-26 13:21:40 -05:00
Brenden Matthews
59513b4c65 Add this back. 2022-12-26 13:21:40 -05:00
Brenden Matthews
c48df06359 Fix (some) wayland/x11 init ordering issues. 2022-12-26 13:21:40 -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
b556f17648
x11: early-return from use_xdbe_setting::set_up if X11 not initialized 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
a30cc64a98
x11: update x11.cc for functionality moved into gui.cc 2022-12-24 09:42:03 -05:00
bi4k8
65f4d4f7eb
colours: define manually_get_x11_color for usage outside X11 2022-12-24 09:42:02 -05:00
bi4k8
d11742ae18
build, colours, core, gui, wayland, wl, x11: implement wayland display backend 2022-12-24 09:42:01 -05:00