Commit graph

26 commits

Author SHA1 Message Date
Kirill Primak
20c208d46a util/array: unclutter 2022-08-29 13:48:42 +00:00
Alexander Orzechowski
31a9fc1fb6 util: Introduce env helpers 2022-08-22 10:18:00 -04:00
Alexander Orzechowski
346e524201 Remove wlr_signal_emit_safe 2022-08-18 07:16:16 -04:00
Kirill Primak
a6a80850b7 util: add wlr_addon 2021-08-10 19:15:48 +02:00
Simon Zeni
e192d87731 move wlr_box from /types to /util 2021-07-06 21:43:17 +02:00
Ryan Farley
b29ac8fbac util/uuid: replace with util/token, remove libuuid
Use 128-bit hexadecimal string tokens generated with /dev/urandom
instead of UUIDs for xdg-foreign handles, removing the libuuid
dependency. Update readme and CI. Closes #2830.

build: remove xdg-foreign feature

With no external dependencies required, there's no reason not to always
build it. Remove WLR_HAS_XDG_FOREIGN as well.
2021-04-11 19:09:36 +02:00
Simon Ser
6721444114 build: simplify HAS_LIBUUID definition
We can just use to_int() instead of having two if branches.
2021-04-06 20:34:47 +02:00
Simon Ser
6f873078d4 build: use dictionnary for features instead of configuration_data
This allows us to easily iterate on all features and only deal with
bools.
2021-02-15 16:32:33 +01:00
Ilia Bozhinov
37602e153b types: add wlr_xdg_foreign_registry 2021-01-05 20:32:56 +01:00
Ilia Bozhinov
bf4e2e0eac util: add support for generating UUIDs
Co-authored-by: Jason Francis <cycl0ps@tuta.io>
2021-01-05 20:32:56 +01:00
Tudor Brindus
dc13bb827d util: fix and move get_current_time_msec into a util file
This commit makes `get_current_time_msec` correctly return milliseconds
as opposed to microseconds. It also considers the value of `tv_sec`, so
we don't lose occasionally go back in time by one second. Finally, the
function is moved into `util/time.cc` so that it can be reused elsewhere
without having to consider these pitfalls.
2020-06-06 00:09:19 +02:00
Simon Ser
29726e6816 util: add wlr_output_destroy_safe
This adds a generic helper to destory transient globals.

See [1]. This patch depends on [2] and [3].

[1]: https://gitlab.freedesktop.org/wayland/wayland/issues/10
[2]: https://gitlab.freedesktop.org/wayland/wayland/merge_requests/28
[3]: https://gitlab.freedesktop.org/wayland/wayland/merge_requests/30
2020-02-17 20:52:37 +01:00
Scott Anderson
cff1c2f740 meson: Various improvements
Bumps minimum version to 0.51.0

- Remove all intermediate static libraries.
  They serve no purpose and are just add a bunch of boilerplate for
  managing dependencies and options. It's now managed as a list of
  files which are compiled into libwlroots directly.

- Use install_subdir instead of installing headers individually.
  I've changed my mind since I did that. Listing them out is annoying as
  hell, and it's easy to forget to do it.

- Add not_found_message for all of our optional dependencies that have a
  meson option. It gives some hints about what option to pass and what
  the optional dependency is for.

- Move all backend subdirectories into their own meson.build. This
keeps some of the backend-specific build logic (especially rdp and
session) more neatly separated off.

- Don't overlink example clients with code they're not using.
  This was done by merging the protocol dictionaries and setting some
  variables containing the code and client header file.
  Example clients now explicitly mention what extension protocols they
  want to link to.

- Split compositor example logic from client example logic.

- Minor formatting changes
2019-12-23 07:48:29 -05:00
emersion
346ec21c4c
util: use shm_open for in-memory files
shm_open is a POSIX function creating an in-memory file. Using it simplifies
the code and removes the dependency on XDG_RUNTIME_DIR. The only downside is
that we need to generate a random name for the shm file.
2018-10-28 22:39:54 +01:00
Markus Ongyerth
74ca2f8fcf Another round of feedback from acrisci 2018-07-14 09:52:34 +02:00
emersion
5e58d46cc1
Add wlr_signal_emit_safe 2018-02-12 09:12:31 +01:00
emersion
ece2c1e4e2
Damage tracking for transformed outputs 2018-01-26 22:11:09 +01:00
emersion
4223fbc763
rootston: damage tracking scale support 2018-01-25 19:15:20 +01:00
Moritz
cef6d75491 Moved os-compatibility and added header
* Moved os-compatibility.c to util
* Added header under util
* Removed static since it isn't needed (i think so)
* Adjusted meson.build to include lib_wlr

Improved some codestyle

* Added guard to os-compatibility.h
* Fixed typo in include statment

Adjusted Guard

* Changed guard to _WLR_UTIL_OS_COMPATIBILITY
2017-11-30 18:01:13 +01:00
Drew DeVault
169b68b17c Rename remaining refs to wlr_list 2017-10-21 22:02:36 -04:00
Tony Crisci
368f74e4df Refactor meson build files
Use tabs for indentation and break up function calls over 80 col.
2017-08-30 14:30:47 -04:00
Drew DeVault
d4b4bfb8bc Fix #64 2017-08-13 08:26:32 -04:00
Drew DeVault
62d8b252c0 Refactor meson and move xdg-shell into wlroots 2017-08-11 09:37:09 -04:00
nyorain
fdab81e1c9 Use meson build system 2017-08-05 22:34:24 +02:00
Drew DeVault
b08aa9fd35 Revert "Merge pull request #27 from ascent12/meson"
This reverts commit 85805da021, reversing
changes made to 8189c64d7f.
2017-07-11 22:16:56 -04:00
Scott Anderson
a2ba226ba3 Use subdir 2017-07-11 09:56:54 +12:00