Commit graph

27 commits

Author SHA1 Message Date
Simon Ser
44a4792fd8 backend/session: operate on wlr_device
Instead of operating on FDs in {open,close}_device, operate on
wlr_devices. This avoids the device lookup in wlr_session and allows
callers to have access to wlr_device fields.

For now, we use it to remove wlr_session_signal_add and replace it with
a more idiomatic wlr_session.events.change field. In the future, other
events will be added.
2020-11-19 22:47:49 +01:00
Simon Ser
0e57effd38 backend/drm: add support for custom modes
Use the CVT algorithm to create a drmModeModeInfo.
2019-10-27 10:46:47 -04: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
nyorain
7b52388424 Rework session handling
Sessions can now be retrieved from a backend in a more general manner.
Multi-backend gets back its `session` field that contains the session
if one was created, removing the interfacing from multi backend with the
drm backend directly. This adds the possibility to use sessions even
without the drm backend.

It additionally fixes the bug that 2 session objects got created when
WLR_BACKENDS were set to "libinput,drm".

To allow vt switching without drm backend (and drm fd) on logind, start
listening to PropertiesChanged signals from dbus and parse the session
"Active" property when no master fd was created (this does not change
current drm backend behaviour in any way).
2018-09-24 23:35:09 +02:00
Ilia Bozhinov
4486b52aa8 move wlr_drm_connector_add_mode to wlr/backend/drm.h 2018-08-13 10:55:42 +03:00
Drew DeVault
211ae764fd Initial pass on API stability guarantees
This introduces -DWLR_USE_UNSTABLE and adds information regarding the
stability status to all headers. I started with a conservative set of
headers to mark as stable:

- types/wlr_matrix.h
- util/edges.h
- util/log.h
- util/region.h
- xcursor.h
2018-07-29 19:20:34 -04:00
Ilia Bozhinov
24cf70ae96 backends: implement custom EGL and renderer initialization
Compositors now have more control over how the backend creates its
renderer. Currently all backends create an EGL/GLES2 renderer, so
the necessary attributes for creating the context are passed to a
user-provided callback function. It is responsible for initializing
provided wlr_egl and to return a renderer. On fail, return 0.

Fixes #987
2018-05-25 14:56:52 +03:00
emersion
b0d99f5c67
Remove wlr_ prefix from local symbols 2018-04-25 23:00:46 +01:00
Drew DeVault
8d490fdb34 Write some more docs 2018-03-19 15:46:28 -04:00
emersion
c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
Dominique Martinet
be95147385 drm backend: add wlr_output_is_drm 2017-12-19 20:13:49 +01:00
Scott Anderson
009c3747a8 Multi-GPU DRM 2017-10-01 22:29:25 +13:00
Scott Anderson
fb93628bda Merge wlr_udev into wlr_session 2017-08-26 14:02:04 +12:00
Calvin Lee
de66bdb867 Add backend detection functions
Resolves #80
2017-08-13 23:08:33 +02:00
Scott Anderson
cb4d50e22c Changed header paths. 2017-08-06 13:25:26 +12:00
Drew DeVault
40b85d992a Refactor udev and drm initialization 2017-06-01 20:29:10 -04:00
Drew DeVault
fee409bd0a Generalize DPMS, remove DRM refs from example 2017-05-31 15:38:26 -04:00
Drew DeVault
03c9b46034 Have backend manage opengl context 2017-05-31 15:15:42 -04:00
Scott Anderson
599d1bcbdc DPMS support 2017-05-13 20:37:15 +12:00
Drew DeVault
00931f2f8f Generalize output handling 2017-05-07 12:26:48 -04:00
Drew DeVault
15b1ce9e6c Refactor backend state management 2017-05-07 10:12:54 -04:00
Scott Anderson
7e9feb70a0 Fixed hotplugging + make EGL more chatty. 2017-05-04 21:58:11 +12:00
Scott Anderson
ef9768858e Changed modesetting interface. 2017-05-03 22:41:49 +12:00
Scott Anderson
d196a79b6c Changed backend to accept wl_display. 2017-05-03 21:28:44 +12:00
Scott Anderson
18387468bb Renamed 'wlr_drm_display' to 'wlr_drm_output' 2017-05-03 17:49:03 +12:00
Scott Anderson
81998fdc98 Removed old session code from DRM backend. 2017-05-03 16:23:07 +12:00
Scott Anderson
e446a5300b Added example. 2017-05-02 18:13:17 +12:00