Current code walks along all screens and initializes screen resources,
then gc's, stipples, root windows for each of them, hence after
the first screen registering new private keys is no more possible.
This crashes modesetting driver if it is not initialized before others.
This patch makes screen resources for all screen initialize first, hence
all necessary private keys (including of the type PRIVATE_WINDOW) are
initialized before root windows are created.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
The space needed to store these extra values is at worst a few dozen bytes.
In exchange for these, larger cursors glyphs can use a more optimal cursor size.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Make the code a bit easier to read by using initialization of the reply
structs, at the point of declaration. Most of them aren't written to later,
just passed into WriteReplyToClient(). Also dropping some useless zero
assignments (struct initializers automatically zero-out unmentioned fields).
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
After the dmabuf fd exported by another screen is imported to a pixmap,
the pixmap holds a reference for the buffer, thus the FD itself finished
its job and needs to be closed to prevent a stale reference to the
buffer.
Signed-off-by: Icenowy Zheng's avatarIcenowy Zheng <uwu@icenowy.me>
Adding a new header for math related functions, beginning with new
MIN/MAX macros, which will be used by subsequent commits.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Nothing in there that we need, include <regionstr.h> instead.
But keeping the file in place, until all external consumer have
been migrated.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Added a workflow to check the commit messages of a PR to make sure each is
signed off by the author. A repo token is required, here named SECRET_TOKEN,
which has access to read and write PR comments.
Signed-off-by: JSOwens <josephs.owens@gmail.com>
This patch exports ConnectionInfo in server_priv.h and references
it in globals.c to force exporting.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
Xvmc isn't using SHM for over 20 years now. There's still a code path for it
that could be enabled explicitly by manually setting HAS_XVMCSHM, but no
indication whatsoever that this ever has been done.
Considering that Xvmc in general already is obsolete for very long time now,
we can safely assume this code path is really dead and can be removed.
Fixes: 9a26d6f39e
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Now that we have untwisted Xinerama side, it's trivial to inline
the few lines for byte-swapping into the actual handlers.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Inspired by f05f269f1d
Reported in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817:
xwayland-24.1.6/redhat-linux-build/../dri3/dri3_screen.c:143:13:
warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
xwayland-24.1.6/redhat-linux-build/../dri3/dri3_screen.c:143:13:
danger: out-of-bounds read from byte 16 till byte 19
but ‘fds’ ends at byte 16
141| int i;
142| for (i = 0; i < num_fds; i++)
143|-> close(fds[i]);
144| return -1;
145| }
Only possible if fds_from_pixmap returns a value > 4, but the analyzer
doesn't know the interface is defined not to do that.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2085>
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
There just had been for backwards compat with older driver sources
that hadn't been kept up to date yet. Not needed anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Not used by any external drivers, so we can drop them and directly use
the corresponding fields.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>