Age | Commit message (Collapse) | Author |
|
|
|
Fixes #3167
A better solution could be made if there's a need to.
|
|
|
|
This also allows us to remove xcb-xkb, since Xinput will now give us the
appropriate XKB modifiers with each event.
|
|
|
|
|
|
There isn't any real reason to delay this until the backend is started.
|
|
|
|
When the Xlib connection is removed, this _conn suffix is going to be
pointless. I'm removing this preemtively for that.
|
|
Use #if instead of #ifdef for wlroots config data
|
|
This prevents some annoying issues when e.g. not including wlr/config.h or
making a typo in the guard name.
|
|
We need to flush when the connection is writable again. This is important in
case the write buffer becomes full. This is also what Weston does [1].
[1]: https://gitlab.freedesktop.org/wayland/weston/blob/master/libweston/compositor-wayland.c#L2593
|
|
|
|
The renderer redesign is going to need the render fd before the backend
is fully started, so we have to move the wl registry code to when the
backend is created instead of when it is started.
We also need to stash the wl_keyboard and emit it to library users
later, once they've added their listeners and started the backend.
|
|
Explicitly use the version we support instead of accepting the
compositor's version.
|
|
Registry was a very small file, and is heavily related to the backend,
so there is not point in keeping them separate.
|
|
This should be set to EGL_OPENGL_ES2_BIT.
Also fixes EGL config attributes in the headless and X11 backends.
|
|
Since the format used by DRM is GBM_FORMAT_ARGB8888, we need at least a R, G, B
and A channel.
|
|
backend/drm: fix frame scheduling on secondary GPUs
|
|
There was a missing copy_drm_surface_mgpu call in drm_connector_schedule_frame
so we asked for a pageflip with an unknown BO, resulting in ENOENT.
Additionally, this commit makes schedule_frame return a bool indicating
failures. This allows schedule_frame_handle_idle_timer to only set
frame_pending to true if a frame has been successfully scheduled. Thus, if a
pageflip fails, rendering won't be blocked forever anymore.
In case a pageflip is already pending, true is returned because a frame has
already been scheduled and will be sent sometime soon.
|
|
This allows the legacy interface to be used instead of atomic if needed. This
is a workaround to make some Intel GPUs work (if this variable is unset) as
well as to make some AMD GPUs work (if this variable is set).
|
|
Fix a few bugs found by the static analyzer
|
|
CLOCK_MONOTONIC appeared in IEEE Std. 1003.1-200x, it was not part of
POSIX.1b (the 1993 version), and FreeBSD treats it accordingly.
|
|
Found by clang static analyzer.
|
|
If a pageflip is pending before cleanup, it's still pending after. This
is used line 1177: drm_connector_cleanup is called and
conn->pageflip_pending is checked afterwards.
Fixes #1297
|
|
output: remove idle_frame event source when destroying output
|
|
As per [1] set drmEventContext version to 2, since wlroots does not use the
page_flip_handler2.
[1]: https://s-opensource.org/2017/04/12/libdrm-event-handling-youre-probably-wrong/
|
|
This prevents the idle event to be activated on a destroyed
output.
This also makes the backend responsible for free-ing modes, as it
is the one allocating them and adding them to the list. Note that
the DRM backend (the only one using modes) already frees them.
|
|
backend/drm: add support for the link-status property
|
|
|
|
|
|
This desynchronizes our rendering loop with the vblank cycle.
In case a compositor doesn't swap buffers but schedules a frame,
emitting a frame event immediately enters a busy-loop.
Instead, ask the backend to send a frame when appropriate. On
Wayland we can just register a frame callback on our surface. On
DRM we can do a no-op pageflip.
Fixes #617
Fixes swaywm/sway#2748
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Improve session handling
|
|
|
|
|
|
|
|
|
|
When a pageflip is pending, we'll get a DRM event for the connector
in the future. We don't want to free the connector immediately
otherwise we'll use-after-free in the pageflip handler.
This commit adds a new state, "DISAPPEARED". This asks the pageflip
handler to destroy the output after it's done pageflipping.
|
|
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).
|
|
This commit applies the multiseat fixes that are part of PR #1063 (
commits 964e0a50 and 47895d2) to the FreeBSD direct backend.
|
|
|
|
|
|
|
|
|