This change is necessary to fix a segfault in intel driver at CloseScreen.
sna_early_close_screen() releases the cursor using FreeCursor(), which needs
miDCScreen private of pScreen. It has already been released by miDCCloseScreen(),
which is a pre-hook, and segfault occurs. Hence it is necessary to move
miDCCloseScreen() to post-hooks.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
This change is necessary to fix a segfault in intel driver at CloseScreen.
sna_early_close_screen() releases the glyph cache using FreePicture(), which needs
PictureScreen private of pScreen. It has already been released by PictureScreenClose(),
which is a pre-hook, and segfault occurs. Hence it is necessary to move
PictureScreenClose() to post-hooks.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
For better code structuring, move the meson logic for drivers into the
drivers/ subdir.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Convenient helper function for creating atom and get it's ID.
If atom already exist, the existing ID is retrieved.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Use the new shortcut helper for cases where we need to check
whether an atom exists and retrieve it's ID.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Use the new shortcut helper for cases where we need to check
whether an atom exists and retrieve it's ID.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Helper function for retrieving _existing_ atom ID for given name.
If atom doesn't exist yet, it won't be created, but returning None instead.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
No need to have extra check for whether the Atom already exists,
just create it on demand.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This symbol is always defined, and the header is always present,
so no need to check for it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This symbol is always defined, and the header is always present,
so no need to check for it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This symbol is always defined, and the header is always present,
so no need to check for it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
usage:
__size_assert(typename, size);
if the type's size (calculated by sizeof) doesn't match the asserted size,
an illegal dummy type will be constructed, thus compilation fails.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
add x_rpcbuf_wsize_units() to retrieve the amount of data written into
the buffer - in 4-byte units.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Adding convenience function for writing out rpc buffer contents to
client and clear the buffer (free it's memory) afterwards.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The size of `int` is machine specific and may be 64 bits wide, which could
overflow the calloc'able size. Practically cannot happen here, since the
ListenTransCount can't go above MAX_CONNECTIONS, but compiler can't know
that and so spitting out a warning.
Using uint32_t really is sufficient here.
> ../os/connection.c: In function ‘CreateWellKnownSockets’:
> ../os/connection.c:274:22: warning: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
> 274 | ListenTransFds = calloc(ListenTransCount, sizeof(int));
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Since TRANS() now will always expand the same, it's better for
maintenance, having the function names written explicitly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
These are always enablde (x11_t is defined when XSERV_t is defined),
so no need for the #ifdef's anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>