Commit Graph

46 Commits

Author SHA1 Message Date
sghctoma fa587b8ea9 Increase _POSIX_C_SOURCE to 200112L
CLOCK_MONOTONIC appeared in IEEE Std. 1003.1-200x, it was not part of
POSIX.1b (the 1993 version), and FreeBSD treats it accordingly.
2018-10-17 08:33:19 +02:00
emersion b0635bf3e7 Rename get_present_clock to get_presentation clock, use it 2018-10-04 22:00:22 +02: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
Ryan Dwyer 691a63d66b Introduce wlr_multi_for_each_backend 2018-09-19 21:53:51 +10:00
emersion 6c05f17a25 backend/multi: add assertions 2018-09-18 11:06:01 +02:00
Mariusz Bialonczyk 15dacebc36 multi-backend: do not expose internal renderers
backend_get_renderer() is now returning the renderer of the primary GPU, instead
of its own renderer, since that's the thing which actually does all of the "real"
rendering

wlr_multi_backend_add() is now adding all subbackends (otherwise only one GPU
is handled).

credits: @ascent12
2018-08-03 07:43:22 +02:00
emersion 7cbef15206
util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
emersion 52bd8aa716
backend/multi: disallow multiple renderers at the same time 2018-05-19 09:09:03 +01:00
emersion b0d99f5c67
Remove wlr_ prefix from local symbols 2018-04-25 23:00:46 +01:00
emersion d2ebbd103c
backend: remove wlr_backend_get_egl 2018-04-08 11:00:56 -04:00
Drew DeVault 1d9be89e2d
Revert "ELF Visibility" 2018-02-19 18:01:27 -05:00
Scott Anderson 86269052eb Explicitly export EFL symbols 2018-02-19 14:26:40 +13:00
emersion c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
emersion 36ead80cd1
Make wlr_signal_emit_safe private 2018-02-12 19:52:47 +01:00
emersion 10ecf871f2
Remove wlr_backend.events.{output_remove,device_remove} 2018-02-12 10:36:43 +01:00
emersion 5e58d46cc1
Add wlr_signal_emit_safe 2018-02-12 09:12:31 +01:00
emersion babdd6ccf7
backend: fix use-after-free when destroying backends
The backend destroy signal is emitted before the output_remove
signal is. When the destroy signal is emitted listeners remove
their output_remove listener, so the output_remove signal is never
received and listeners have an invalid output pointer.

The correct way to solve this would be to remove the output_remove
signal completely and use the wlr_output.events.destroy signal
instead. This isn't yet possible because wl_signal_emit is unsafe
and listeners cannot be removed in listeners.
2018-01-30 19:45:57 +01:00
emersion 4fa90b0511
Backport screenshooter fixes from the renderer redesign v1
This backports some changes to #319 to fix the screenshooter data
format. This also adds wlr_backend_get_renderer which will be
useful to support multiple renderers.
2018-01-23 22:06:54 +01:00
Timidger 1478ef3202
Remove display_destroy on multi-backend destroy 2017-12-28 10:54:30 -06:00
Tony Crisci d1dce19253 handle display destroy 2017-12-21 08:17:35 -05:00
Tony Crisci 6c8fd6017e backend add and remove events 2017-12-20 05:54:41 -05:00
Tony Crisci ee39dff1e7 rootston: handle backend creation failed 2017-12-20 05:51:23 -05:00
Tony Crisci 58e69c9ce1 multibackend remove subbackend 2017-12-19 18:49:00 -05:00
Tony Crisci 6c75a184e7 subbackend state destroy 2017-12-19 18:40:27 -05:00
Tony Crisci a937016e38 remove session from multibackend 2017-12-19 18:25:46 -05:00
emersion 4a36ba4bdd
Destroy multi backend on display destroy 2017-12-19 18:28:47 +01:00
emersion 6001235b04
Listen to display destroy in session
It's not the backend's responsibility to destroy the session anymore.
2017-12-08 11:17:56 +01:00
Dominique Martinet 844b166c1b multi_backend_destroy: fix trivial use-after-free 2017-11-01 21:14:23 +01:00
Drew DeVault 16f35ecbea Merge branch 'master' into heghe/wl_list 2017-10-21 22:03:48 -04:00
emersion c8570d0e42
Remove wl_list_init when using wl_signal_add 2017-10-21 12:35:51 +02:00
Heghedus Razvan bde25fe020 Replace list_t with wl_list in wlr_multi_backend
Signed-off-by: Heghedus Razvan <heghedus.razvan@gmail.com>
2017-10-20 11:45:31 +03:00
Scott Anderson fb93628bda Merge wlr_udev into wlr_session 2017-08-26 14:02:04 +12:00
Scott Anderson 46823152ea Rename functions to be consistent with #93 2017-08-26 11:56:43 +12:00
Calvin Lee 901c14c409 Prevent alloc errors from crashing in `list_t`
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-16 09:23:21 +02:00
Calvin Lee 5cc7342606 Prevent alloc errors from crashing
Resolves #76
2017-08-15 08:04:57 +02:00
Dominique Martinet 9a9dd15d5f Fix wlr_multi_backend_add incorrect assert 2017-08-14 15:01:59 +02:00
Calvin Lee de66bdb867 Add backend detection functions
Resolves #80
2017-08-13 23:08:33 +02:00
Drew DeVault 4386816889 wlr_backend_init -> wlr_backend_start
Also renames create to init. We'll use create for anything that
allocates and init for anything that takes a pointer and initializes it.
2017-08-13 10:19:57 -04:00
Drew DeVault 81cd90297d Refactor out wlr_backend_state from wl/multi 2017-08-12 11:43:36 -04:00
Drew DeVault c24351681f Refactor EGL handling 2017-08-10 22:15:37 -04:00
Drew DeVault 5bf61ca7ed Check for multi backend before using it 2017-08-05 23:08:35 -04:00
Scott Anderson 4d4da18437 Fixed VT switching 2017-08-06 13:37:49 +12:00
Scott Anderson cb4d50e22c Changed header paths. 2017-08-06 13:25:26 +12:00
Scott Anderson ae4478e17f Changed ownership of wlr_session to the multi backend.
Currently breaks VT switching for examples.
2017-08-06 13:25:26 +12:00
Drew DeVault f4453d104d Reorganize wlr-common 2017-06-21 12:10:07 -04:00
Drew DeVault e257afeb7e Establish multi backend support 2017-06-13 08:10:36 -04:00