* 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>
* Fix dpi scaling maximum_width setting
* Set workspace dimensions from WL output_geometry
* Append script parent dir to lua package.path
* Fix issues with dpi_scale function selection
* Re-implement rounding through `type_traits` generically
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
- 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>
- 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.
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>
Fontconfig has a bug in FcFini() where it calls assert when it probably
shouldn't. This looks to be fixed in
6f6b397802,
which is in libfontconfig >=2.13.93.
Removing this seems to be safe, it will cause valgrind to show mem
leaks, but it doesn't look to be a problem in practice.
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>
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>
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>
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
* 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>
* 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>
* 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>
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.
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.