aboutsummaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2019-07-17Use -fmacro-prefix-map to strip build pathManuel Stoeckl
This commit matches sway's 2dc4978d8af326c310057ca8fd22a4c7f5d09335. To help ensure a reproducible build (when debug info is disabled), the meson build script now uses the -fmacro-prefix-map command line argument supported by GCC to strip the build-path dependent bytes of each __FILE__ string used by wlr_log and related functions. A rather ugly algorithm is used to compute the relative path between the build and source folders, because meson has no specific function for this. When the compiler does not support -fmacro-prefix-map, fall back to shifting the start of each __FILE__ string by the length of the relative path to the source directory.
2019-06-16Use a set to track pointer button state.Ashkan Kiani
In addition to `button_count`, we keep track of the current buttons pressed just as in `wlr_keyboard`. Add `set_add` and `set_remove` to assist with this. These functions can only be used with values greater than 0 (such as the button/key masks for keyboards and pointers). Partially addresses: - https://github.com/swaywm/wlroots/issues/1716 - https://github.com/swaywm/wlroots/issues/1593
2019-04-07util/log: setup wayland log handleremersion
2018-11-09Use ftruncate to set shared memory object's sizesghctoma
The posix_fallocate function should only be used with regular files.
2018-11-08Force ftruncate for shared mem. objects on FreeBSDsghctoma
FreeBSD does not allow to use posix_fallocate on shared memory objects.
2018-10-28util: use shm_open for in-memory filesemersion
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-09-18Fix implicit conversion of floats to ints in calls to ↵Las
pixman_region32_contains_point I do not think the conversion is specifically defined, but on my system and SirCmpwn's the floats are rounded instead of floored, which is incorrect in this case, since for a range from 0 to 256, any value greater or equal to 0 and less than 256 is valid. I.e. [0;256[, or 0 <= x < 256, but if x is e.g. -0.1, then it will be rounded to 0, which is invalid. The correct behavior would be to floor to -1.
2018-09-18Implement pointer-constraints protocol in wlroots and rootstonLas
2018-09-01Add function wlr_log_get_verbosity()random human
Returns the verbosity passed to wlr_log_init().
2018-07-21util: include config in os-compatibility.cemersion
2018-07-21Use posix_fallocate when availableemersion
2018-07-14Another round of feedback from acrisciMarkus Ongyerth
2018-07-09util: add wlr_ prefix to log symbolsemersion
2018-06-30util/create_tmpfile: set restrictive umask for these filesDominique Martinet
Even if the file is removed right away, a race with someone using inotify is definitely possible, so play safe and restrict umask for our tmpfiles Found through static analysis.
2018-04-25Remove wlr_ prefix from local symbolsemersion
2018-03-26Fix damage tracking for rotated surfacesemersion
It was broken because the damage extents were rotated about its own center, not about the center of the surface. This adds a new wlr_region_rotated_bounds that rotates regions. This allows us to have only one code path (for both non-rotated views and rotated views) and optimizes rendering for rotated views.
2018-02-21Rename _strip_path to wlr_strip_pathGuido Günther
since it's a public function
2018-02-19Revert "ELF Visibility"Drew DeVault
2018-02-19Explicitly export EFL symbolsScott Anderson
2018-02-12Reformat all #include directivesemersion
2018-02-12Make wlr_signal_emit_safe privateemersion
2018-02-12Add wlr_signal_emit_safeemersion
2018-01-30rootston: fix urxvt damage on HiDPI outputsemersion
util/region: add wlr_region_expand
2018-01-26Damage tracking for transformed outputsemersion
2018-01-25rootston: damage tracking scale supportemersion
2017-12-31Allow configurable verbosityCalvin Lee
2017-11-30Moved os-compatibility and added headerMoritz
* 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-10-21Rename remaining refs to wlr_listDrew DeVault
2017-10-11Add FreeBSD compatibilityGreg V
2017-08-30Refactor meson build filesTony Crisci
Use tabs for indentation and break up function calls over 80 col.
2017-08-16Prevent alloc errors from crashing in `list_t`Calvin Lee
This commit changes the `list_t` api so that alloc errors can be detected and worked around. Also fixes errors not found in 5cc7342
2017-08-15Merge pull request #88 from 4e554c4c/alloc_crashingDrew DeVault
Prevent alloc errors from crashing
2017-08-15Prevent alloc errors from crashingCalvin Lee
Resolves #76
2017-08-14Fix style issuesnyorain
2017-08-13Fix #64Drew DeVault
2017-08-11Refactor meson and move xdg-shell into wlrootsDrew DeVault
2017-08-05Use meson build systemnyorain
2017-08-02Fix #40Drew DeVault
2017-07-11Revert "Merge pull request #27 from ascent12/meson"Drew DeVault
This reverts commit 85805da021006697c85489c3e30717c2b807441c, reversing changes made to 8189c64d7f07a756abf5a6189719f02b2f1af967.
2017-07-11Use subdirScott Anderson
2017-07-11Changed build system to mesonScott Anderson
2017-06-21Utilize wlr_log in example loggingDrew DeVault
2017-06-21Reorganize wlr-commonDrew DeVault