On BSD make, $> is an alias for $^. On both GNU and BSD make, $^
is supported. Specifying both resulted in duplicate object files
passed to the linker:
ld: error: duplicate symbol: main
>>> defined at tinywl.c:887
>>> tinywl.o:(main)
>>> defined at tinywl.c:887
>>> tinywl.o:(.text+0x0)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Only use $^ and remove $>.
This avoids hardcoding lists of TFs/primaries in compositors.
I've considered adding wlr_color_manager_v1_create_with_renderer()
instead, but I'm worried that some aspects of the options struct
don't really depend on the renderer, but on the compositor. Such
things are features and render intents.
I've considered returning a const array, but this would tie our
hands if we want to make the renderer advertise the set of
TFs/primaries it supports, instead of having a single flag gating
all of them.
This is needed for cases where the touch operation goes over a region
where no surfaces are present. In this case, we'd want to notify the
touch grabs (for example DnD grabs) that no focus is currently focused.
BT.1886 is different from other EOTFs in that the spec says that offset
b must be in electrical domain, so use the assumed display environment
from the specification as Lmin and Lmax then normalize bt.1886 to
produce optical luminance L in [0, 1]. See discussion at
https://gitlab.freedesktop.org/pq/color-and-hdr/-/merge_requests/63#note_3090016
If the client application is composed of multiple components and they
bind the manager global separately, choosing a single toplevel resource
with wl_resource_find_for_client() may result in a component only seeing
unknown toplevel handles from another component.
Maybe we should track which toplevel handle resource originate from
which manager resource so that a component never sees toplevel handles
resources from another component, but it's too annoying to implement.
Fixes d1c88e9 "render/vulkan: add linear single-subpass"
`find_or_create_render_setup` still assumed a single-buffer setup
always implied use of an srgb format
Currently it is possible to crash a wlroots compositor by setting any
axis source other than 0 and sending an axis event in the HORIZONTAL
direction from wlr_virtual_pointer since the axis source is only set on
the first axis.
This then hits the assert in wlr_seat_pointer.c:332.
Fix by always setting the source on all axis.
Not all eotf or eotf inverse are well defined for values outside the
intended domain, so just ignore it and clamp it away.
An alternative solution would be to use sign preserving pow here (i.e.
sign(x) * pow(abs(x), p)), however I'm not sure that makes sense or is
defined anywhere. Negative values here are likely a result of colors
being outside the gamut range, so clipping them to 0 is more correct
than mirroring from 0.
When an FD is passed to xcb_connect_to_fd(), xcb takes ownership of that
FD and is responsible for closing it, which it does when
xcb_disconnect() is called. But the xwayland handler code also keeps a
copy of the FD and closes it via safe_close() in
server_finish_process().
This double-close can cause all sorts of problems if another part of
wlroots allocates another FD between the two closes - the latter close
will close the wrong FD and things go horribly wrong (in my case leading
to use-after-free and segfaults).
Fix this by setting wm_fd[0]=-1 after calling xwm_create(), and ensuring
that xwm_create() closes the FD if startup errors occur.
This fixes the issue that a scrollbar in a maximized GTK/Chromium window
cannot be dragged when cursor is on the right/bottom edge of the output.
The issue was caused by rounding in `wl_fixed_from_double()` ([1]); if
`wlr_cursor_move()` constrains the x-position of the cursor to
`(output width)-1/65536`, `wl_fixed_from_double()` converts it to just
`(output width)`, which is perceived as outside of the window by
GTK/Chromium.
Using 1/256 (minimal unit of `wl_fixed_t`) instead of 1/65536 avoids
this rounding issue.
[1]: f246e619d1
VKMS has been migrated to the new faux bus. This causes breakage
in CI, because we used the platform bus to find the right device.
udev hasn't been updated yet to support the faux bus, so just use
sysfs instead.
Fixes incorrectly rejecting scanout for gamma2.2 buffers when the output
has no image description set. This happens on `hdr off` mode on sway.
Also refactor the scanout check into its own function while at it to
make it easier to follow.