Antonin Décimo (3):
Fix typos
Fix incorrect format parameters
xwayland: free server in error path
Daniel De Graaf (1):
wlr_virtual_keyboard: fix fd leak
Daniel Kondor (2):
foreign-toplevel-management: report parent toplevel
foreign toplevel: send parent event only to clients that support it
Devin J. Pohly (1):
drm: fix uninitialized read
Drew DeVault (1):
Remove xdg-shell v6
Guido Cella (1):
render: Don't crash on 0 dimensions
Ilia Bozhinov (9):
xwayland: do not allow apps to change focus after wlroots request
make sure to fail setting gamma on disabled outputs
backend/wayland: destroy relative pointer when output is disconnected
wayland: emit relative pointer events only for current pointer
xwayland: disconnect display destroy listener even if xwayland didn't initialize
xwayland: add set_geometry event
backend/wayland: add touch support to the wayland backend
xdg_shell: fix a typo
xdg_shell: handle inert popups
Isaac Freund (6):
xdg-shell: split last-acked and current state
layer-shell: add for_each_popup
layer-shell: error on 0 dimension without anchors
xdg_positioner: remove unused field
wlr_drag: remove unused point_destroy field
xwayland: remove unused listener
Kenny Levinsen (2):
session: Add libseat backend
session: Add missing init to direct-freebsd
Marten Ringwelski (1):
backend/drm: Check if output is enabled before sending frame event
Mykola Orliuk (5):
backend/wayland: manage cursor for current pointer
backend/wayland: factor out wlr_wl_seat
backend/wayland: add error flow in create_wl_seat
backend/wayland: fix input creation error handling
backend/wayland: fix some keyboard/touch leaks
Patrick Steinhardt (1):
session: Don't refuse unprivileged creation of "direct" backend
Roman Gilg (3):
output-management-v1: add head identifying events
output-management-v1: send head identifying information
output-management-v1: send complete head state on enable change
Ronan Pigott (1):
virtual_pointer: remember current axis for axis events
Rouven Czerwinski (2):
examples: remove unnecessary gles2.h imports
xwm: add loop detection for read_surface_parent
Ryan Walklin (4):
Implement logind session SetType method to change session type to wayland
Also set XDG_SESSION_TYPE
Don't set XDG_SESSION_TYPE unless logind SetType succeeds
Quieten failure to set login session type
Scott Moreau (2):
xwm: Set _NET_WM_STATE_FOCUSED property for the focused surface
foreign toplevel: Fix whitespace error
Simon Ser (31):
xwayland/xwm: don't insert surface in list on error
xwayland/xwm: add prop count assert in xsurface_set_net_wm_state
xwayland/xwm: use initializer for props in xsurface_set_wm_state
render/gles2: make wlr_gles2_texture_from_* private
render/gles2: keep ref to wlr_gles2_renderer in wlr_gles2_texture
render/gles2: make push/pop debug functions take a wlr_renderer
render/gles2: remove gles2_procs
gamma-control-v1: fix use-after-free in gamma_control_handle_set_gamma
examples/simple: use wlr_output_preferred_mode
examples/simple: use wlr_renderer instead of GL
Remove unnecessary wl_display_dispatch calls
output: introduce wlr_output_event_commit
output-power-management-v1: listen to output commit
examples/dmabuf-capture: add extra roundtrip for wl_output listener
backend/session/libseat: register log handler
backend: remove check for _WAYLAND_DISPLAY
backend/libinput: improve logger callback
render: define EGL_NO_PLATFORM_SPECIFIC_TYPES (#2452)
backend/drm: fix "a page-flip is already pending" errors on modeset
xwayland: minor code style fixes
xwayland: log unhandled NET_WM_STATE property changes
gamma-control-v1: apply gamma LUT when output gets enabled
screencopy: stop setting needs_frame flag
backend/drm: export pending FB in export_dmabuf, if any
output: update docs to reflect reality
output: add when field to wlr_output_event_commit
export-dmabuf: export DMA-BUF on output commit
screencopy: perform DMA-BUF copy on output commit
screencopy: send failed when copying a DMA-BUF with a region
input-method: send modifiers in set_keyboard
Update version to 0.12.0
Tobias Langendorf (1):
xwm: add support for xwayland minimize
Tudor Brindus (11):
examples: use `perror` instead of `fprintf` GNU %m `printf` extension
xwayland: using %m in `wlr_log` is broken, use `wlr_log_errno` instead
xwayland: fix use-after-free in selection handling
xwayland: introduce WLR_XWAYLAND for specifying which Xwayland to use
xwayland: remove stale transfers from the same requestor
xwayland: notify requestor when we fail to respond to their request
xwayland: fix minor typo in debug log
types/wlr_keyboard: use bitmasks for wlr_keyboard_led and wlr_keyboard_modifier enums
types/wlr_output_layout: use bitmask for wlr_direction
util/edges: use bitmask for wlr_edges
render/dmabuf: use bitmask for wlr_dmabuf_attributes_flags
Valentin (2):
Use fixed size integer type
Fix undefined behavior
nerdopolis (1):
Accommodate for CONFIG_VT=0, all TTYs are in seat0, but not all seat0s have TTYs
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEENP+VJs/vDpejQOLkD9574OiPXkgFAl+n+t4ACgkQD9574OiP
Xkg8TRAAopnm99XA7TE3w0UEDhXUBvlWB05fS6M4wiSNXjMp1ENW0O7PGtIbZt1Y
/mbJQ8yAXbT0i5X7aE6iKTW8GjHoWpwaYCL3BrDb8A8Hl2s04pxSiLL2JMbHyb02
KsCjZSbCBGldmgYOaJZl9SM5TDSyYo8xwGprkRiqK8Nz/SL75+sR4Jf/iMfaP1Rx
qu2o87z3B1DEX+dvf0UaStJSmAb5sBmEW0X8sj8jf6Iubwsxy0BjI00AoTa2TS7k
U1h3QuHqFy65pVg9Hwe5jPsoKVN5UqFzZNFja+91fXcjohm4gRkrnPZHCXijAl5E
+sNSkY0SjO1ci4KSRXRTzD9X7HfA2f4yGjDEjoKorop7kUVAHQeKfFbbrKEjoYao
aJLCFCNjT2ednZJhteYXKEodYfQov6AEirPJtw+UEDe8JgLSDZJZtXnBXKBXEeFa
BgEzkoQiKqA4J3ToEj2fWrNMLkjfnc99vGn3tso9wfVB93sfg8lX1L9BI9CklGuD
je6inBDRTa/RmALe1IGE4Y2PwrlmtQqHVjqDKv5MDpy65ffuYS3bH18fSLTW2cWY
zYQmFOuj1VHxqT1noKAqTeowR691KC7JmAG2RjOZK2huP1xkijdaOVCA4bWlEqS3
zld5pUUJ4k30UJmJIUK1Vp9eCStnPvxti1ngfuLHZ6WCe/jT8Os=
=2poj
-----END PGP SIGNATURE-----
Merge tag '0.12.0' into color-profiles
wlroots 0.12.0
Antonin Décimo (3):
Fix typos
Fix incorrect format parameters
xwayland: free server in error path
Daniel De Graaf (1):
wlr_virtual_keyboard: fix fd leak
Daniel Kondor (2):
foreign-toplevel-management: report parent toplevel
foreign toplevel: send parent event only to clients that support it
Devin J. Pohly (1):
drm: fix uninitialized read
Drew DeVault (1):
Remove xdg-shell v6
Guido Cella (1):
render: Don't crash on 0 dimensions
Ilia Bozhinov (9):
xwayland: do not allow apps to change focus after wlroots request
make sure to fail setting gamma on disabled outputs
backend/wayland: destroy relative pointer when output is disconnected
wayland: emit relative pointer events only for current pointer
xwayland: disconnect display destroy listener even if xwayland didn't initialize
xwayland: add set_geometry event
backend/wayland: add touch support to the wayland backend
xdg_shell: fix a typo
xdg_shell: handle inert popups
Isaac Freund (6):
xdg-shell: split last-acked and current state
layer-shell: add for_each_popup
layer-shell: error on 0 dimension without anchors
xdg_positioner: remove unused field
wlr_drag: remove unused point_destroy field
xwayland: remove unused listener
Kenny Levinsen (2):
session: Add libseat backend
session: Add missing init to direct-freebsd
Marten Ringwelski (1):
backend/drm: Check if output is enabled before sending frame event
Mykola Orliuk (5):
backend/wayland: manage cursor for current pointer
backend/wayland: factor out wlr_wl_seat
backend/wayland: add error flow in create_wl_seat
backend/wayland: fix input creation error handling
backend/wayland: fix some keyboard/touch leaks
Patrick Steinhardt (1):
session: Don't refuse unprivileged creation of "direct" backend
Roman Gilg (3):
output-management-v1: add head identifying events
output-management-v1: send head identifying information
output-management-v1: send complete head state on enable change
Ronan Pigott (1):
virtual_pointer: remember current axis for axis events
Rouven Czerwinski (2):
examples: remove unnecessary gles2.h imports
xwm: add loop detection for read_surface_parent
Ryan Walklin (4):
Implement logind session SetType method to change session type to wayland
Also set XDG_SESSION_TYPE
Don't set XDG_SESSION_TYPE unless logind SetType succeeds
Quieten failure to set login session type
Scott Moreau (2):
xwm: Set _NET_WM_STATE_FOCUSED property for the focused surface
foreign toplevel: Fix whitespace error
Simon Ser (31):
xwayland/xwm: don't insert surface in list on error
xwayland/xwm: add prop count assert in xsurface_set_net_wm_state
xwayland/xwm: use initializer for props in xsurface_set_wm_state
render/gles2: make wlr_gles2_texture_from_* private
render/gles2: keep ref to wlr_gles2_renderer in wlr_gles2_texture
render/gles2: make push/pop debug functions take a wlr_renderer
render/gles2: remove gles2_procs
gamma-control-v1: fix use-after-free in gamma_control_handle_set_gamma
examples/simple: use wlr_output_preferred_mode
examples/simple: use wlr_renderer instead of GL
Remove unnecessary wl_display_dispatch calls
output: introduce wlr_output_event_commit
output-power-management-v1: listen to output commit
examples/dmabuf-capture: add extra roundtrip for wl_output listener
backend/session/libseat: register log handler
backend: remove check for _WAYLAND_DISPLAY
backend/libinput: improve logger callback
render: define EGL_NO_PLATFORM_SPECIFIC_TYPES (#2452)
backend/drm: fix "a page-flip is already pending" errors on modeset
xwayland: minor code style fixes
xwayland: log unhandled NET_WM_STATE property changes
gamma-control-v1: apply gamma LUT when output gets enabled
screencopy: stop setting needs_frame flag
backend/drm: export pending FB in export_dmabuf, if any
output: update docs to reflect reality
output: add when field to wlr_output_event_commit
export-dmabuf: export DMA-BUF on output commit
screencopy: perform DMA-BUF copy on output commit
screencopy: send failed when copying a DMA-BUF with a region
input-method: send modifiers in set_keyboard
Update version to 0.12.0
Tobias Langendorf (1):
xwm: add support for xwayland minimize
Tudor Brindus (11):
examples: use `perror` instead of `fprintf` GNU %m `printf` extension
xwayland: using %m in `wlr_log` is broken, use `wlr_log_errno` instead
xwayland: fix use-after-free in selection handling
xwayland: introduce WLR_XWAYLAND for specifying which Xwayland to use
xwayland: remove stale transfers from the same requestor
xwayland: notify requestor when we fail to respond to their request
xwayland: fix minor typo in debug log
types/wlr_keyboard: use bitmasks for wlr_keyboard_led and wlr_keyboard_modifier enums
types/wlr_output_layout: use bitmask for wlr_direction
util/edges: use bitmask for wlr_edges
render/dmabuf: use bitmask for wlr_dmabuf_attributes_flags
Valentin (2):
Use fixed size integer type
Fix undefined behavior
nerdopolis (1):
Accommodate for CONFIG_VT=0, all TTYs are in seat0, but not all seat0s have TTYs
xdg_popups can be destroyed by the compositor when closed. When this happens,
wlroots makes the xdg_popup surface inert and resets the xdg_surface role to
NONE.
Currently, wlroots sends a protocol error and asserts that an xdg_surface has
a role when committed. This is racy if at the same time the client commits an
xdg_popup and the compositor closes it. This patch removes the assertion and
ignores commits on xdg_surfaces without a role set.
We were previously exporting DMA-BUFs when receiving the capture_output
request, and sending a done event on wlr_output.events.precommit. Instead,
export and send done on wlr_output.events.commit.
When performing a modeset, the DRM backend will request a page-flip
event. However frame_pending wasn't set to true, so any subsequent
wlr_output_schedule_frame calls would imemdiately trigger a synthetic
frame event, asking the compositor to submit a new frame. Committing the
new frame fails with "a page-flip is already pending" error in the DRM
backend.
When an output is disabled one last pageflip will happen to disable it.
Currently this pageflip causes a frame event.
Since the output is disabled we don't want to send this frame event.
The resource field of wlr_xdg_positioner is never initialized or
accessed within wlroots. The wl_resource for this interface is stored
in the wlr_xdg_positioner_resource struct.
We already mostly did this, but there were a couple of branches
(`calloc` failures) where we'd bail without letting the other side know.
Refs swaywm/sway#4007. Likely not going to be a real improvement there
(if `calloc` fails you're already pretty screwed), but it does address a
theoretical possibility.
It seems that if we ever try to reply to a selection request after
another has been sent by the same requestor (we reply in FIFO order),
the requestor never reads from it, and we end up stalling forever on a
transfer that will never complete.
It appears that `XCB_SELECTION_REQUEST` has some sort of singleton
semantics, and new requests for the same selection are meant to replace
outstanding older ones. I couldn't find a reference for this, but
empirically this does seem to be the case.
Real (contrived) case where we don't currently do this, and things break:
* run fcitx
* run Slack
* wl-copy < <(base64 /opt/firefox/libxul.so) # or some other large file
* focus Slack (no need to paste)
fcitx will send in an `XCB_SELECTION_REQUEST`, and we'll start
processing it. Immediately after, Slack sends its own. fcitx hangs for a
long, long time. In the meantime, Slack retries and sends another
selection request. We now have two pending requests from Slack.
Eventually fcitx gives up (or it can be `pkill`'d), and we start
processing the first request Slack gave us (FIFO). Slack (Electron?)
isn't listening on the other end anymore, and this transfer never
completes. The X11 clipboard becomes unusable until Slack is killed.
After this patch, the clipboard is immediately usable again after fcitx
bails. Also added a bunch of debug-level logging that makes diagnosing
this sort of issue easier.
Refs swaywm/sway#4007.
When debugging Xwayland-related issues, a common first step in debugging
has been to ask the reporter to move their real Xwayland to
/usr/bin/Xwayland.bin, and create a shell script starting Xwayland with
extra arguments under the original /usr/bin/Xwayland location.
Introducing a `WLR_XWAYLAND` environment variable makes this less
invasive, by allowing the user to swap out Xwayland without resorting to
global system changes (or source patches).
Fixes#2425.
wlroots can only handle one outgoing transfer at a time, so it keeps a
list of pending selections. The head of the list is the currently-active
selection, and when that transfer completes and is destroyed, the next
one is started.
The trouble is when you have a transfer to some app that is misbehaving.
fcitx is one such application. With really large transfers, fcitx will
hang and never wake up again. So, you can end up with a transfer list
that looks like this:
| T1: started | T2: pending | T3: pending | T4: pending |
The file descriptor for transfer T1 is registered in libwayland's epoll
loop. The rest are waiting in wlroots' list.
As a user, you want your clipboard back, so you `pkill fcitx`. Now
Xwayland sends `XCB_DESTROY_NOTIFY` to let us know to give up. We clean
up T4 first.
Due to a bug in wlroots code, we register the (fd, transfer data
pointer) pair for T1 with libwayland *again*, despite it already being
registered. We do this 2 more times as we remove T3 and T2.
Finally, we remove T1 and `free` all the memory associated with it,
before `close`-ing its transfer file descriptor.
However, we still have 3 copies of T1's file descriptor left in the
epoll loop, since we erroneously added them as part of removing T2/3/4.
When we `close` the file descriptor as part of T1's teardown, we
actually cause the epoll loop to wake up the next time around, saying
"this file descriptor has activity!" (it was closed, so `read`-ing would
normally return 0 to let us know of EOF).
But instead of returning 0, it returns -1 with `EBADF`, because the file
descriptor has already been closed. And finally, as part of error-handling
this, we access the transfer pointer, which was `free`'d. And we crash.
This one was awful to track down, but calls to `wlr_log` with %m have
the errno masked by the `isatty` call in `log_stderr`. Switch them to
`wlr_log_errno` instead.
Cue quality "how can read(2) POSSIBLY be returning ENOTTY?" moments.
The data of a head is only sent when it is enabled. While the head was disabled
data might have been changed. In this case clients were not informed about this
change. A later enable change that does not also update the other data must
still lead to the propagation of this data.
Since we do not know what other data was changed while the head was disabled
just send together with an enable change all current data.
The protocol requires clients to set opposing anchors when requesting
a width or height of 0.
The goal of this patch is not to break clients that rely on this
behavior but to improve the consistency of the layer shell ecosystem
through adherence to the protocol.
I'm not sure what this was used for, but it's not used by libwayland.
Setting _WAYLAND_DISPLAY would result in the Wayland backend being
picked but would ignore the actual value of the env variable.
This brings the layer-shell api in line with that of xdg-shell and
avoids reimplementing this function in every compositor in order to
render layer shell popups correctly.
The following information through separate events are added:
- make
- model
- serial_number
This should allow clients to identify a display over different sessions and
load configuration data back.
A note is added that the description should be preferred when representing a
display in UI to users but as a short form for example the model could be used
in this case of course too.