Commit Graph

12 Commits

Author SHA1 Message Date
Simon Ser 842093bb84 Define _POSIX_C_SOURCE globally
Stop trying to maintain a per-file _POSIX_C_SOURCE. Instead,
require POSIX.1-2008 globally. A lot of core source files depend
on that already.

Some care must be taken on a few select files where we need a bit
more than POSIX. Some files need XSI extensions (_XOPEN_SOURCE) and
some files need BSD extensions (_DEFAULT_SOURCE). In both cases,
these feature test macros imply _POSIX_C_SOURCE. Make sure to not
define both these macros and _POSIX_C_SOURCE explicitly to avoid
POSIX requirement conflicts (e.g. _POSIX_C_SOURCE says POSIX.1-2001
but _XOPEN_SOURCE says POSIX.1-2008).

Additionally, there is one special case in render/vulkan/vulkan.c.
That file needs major()/minor(), and these are system-specific.
On FreeBSD, _POSIX_C_SOURCE hides system-specific symbols so we need
to make sure it's not defined for this file. On Linux, we can
explicitly include <sys/sysmacros.h> and ensure that apart from
symbols defined there the file only uses POSIX toys.
2024-02-15 15:41:12 +01:00
Alexander Orzechowski 1b0694b794 treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
Alexander Orzechowski ef4baea0e2 Use wl_signal_emit_mutable 2022-08-18 07:16:16 -04:00
Ferdinand Bachmann 2d4e813530 types/wlr_pointer_gestures_v1.c: get client from seat client instead of resource 2022-04-16 20:53:52 +02:00
Ferdinand Bachmann eedb9df531 types/wlr_pointer_gestures_v1: null-check both focused_surface and focused_client
(fixes #3385)
2022-04-15 16:06:16 +02:00
Kirill Primak 617eb4fb93 surface: deprecate wlr_surface.h 2022-01-13 10:06:41 +00:00
José Expósito 20d9448257 wlr_pointer_gestures: hold gestures (protocol v3)
Update the pointer gestures protocol to version 3 allowing to send hold
gestures to clients.
2021-09-27 15:30:31 +02:00
José Expósito 5f3e490c80 wlr_pointer_gestures: update protocol to version 2 2021-09-27 15:30:31 +02:00
Simon Ser 5cde35923c Simplify globals implementation by removing destructors
Some globals are static and it doesn't make sense to destroy them before
the wl_display. For instance, wl_compositor should be created before the
display is started and shouldn't be destroyed.

For these globals, we can simplify the code by removing the destructor
and stop keeping track of wl_resources (these will be destroyed with the
wl_display by libwayland).
2019-11-25 09:01:46 -05:00
Simon Ser ca45f4490c Remove all wayland-server.h includes
The documentation for wayland-server.h says:

> Use of this header file is discouraged. Prefer including
> wayland-server-core.h instead, which does not include the server protocol
> header and as such only defines the library PI, excluding the deprecated API
> below.

Replacing wayland-server.h with wayland-server-core.h allows us to drop the
WL_HIDE_DEPRECATED declaration.
2019-07-27 15:49:32 -04:00
Manuel Stoeckl 1d78bae19d wlr_pointer_gestures: Register event serials 2019-06-30 15:01:05 -04:00
Greg V 9fe8e37961 Implement the pointer-gestures-unstable-v1 protocol
This protocol relays touchpad gesture events produced by libinput to
supporting clients (e.g. Evince, Eye of GNOME).
2019-01-28 22:06:36 +01:00