The commit 30cec78 incorrectly changed RRInitPrimeSyncProps to not
create the atom if it doesn't exist.
Signed-off-by: dec05eba <dec05eba@protonmail.com>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
It's now doing exactly the same as ProcXCMiscDispatch(), so it's not
actually needed anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Move conditional swapping of request fields into main request handler,
no extra swapped handler needed anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Move conditional swapping of request fields into main request handler,
no extra swapped handler needed anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Use x_rpcbuf for reply payload assembly, instead of pre-counting and
pre-allocating buffer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
In preparation of potentially more drivers being move in-tree,
put the input drivers into `input` subdirectory.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
In preparation of potentially more drivers being move in-tree,
put the video drivers into `video` subdirectory.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of always zero'ing out the whole buffer at allocation time, only
do it where really necessary. Also adding x_rpcbuf_reserve0() for reserving
buffer space that's explicitly cleared.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Both are the same types, the `struct x_rpcbuf` still remains, but it
seems more clear to use the `x_rpcbuf_t` as the canonical name.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This reverts commit c32b5b4d5b.
The commit writes out of bounds with tchar[stuff->nbytes] write
since the string isn't null terminated.
This messed other data which makes requests fail and window managers/
desktop environments fail to start.
ProcXFixesSetCursorName also incorrectly uses dixGetAtomID
which doesn't create the atom if it doesn't exist, which it previously
did with MakeAtom(..., TRUE).
The new dixGet/AddAtom methods dont work without null-terminated strings
so the change has to be reverted instead.
Signed-off-by: dec05eba <dec05eba@protonmail.com>
Consolidate reply struct assembly into one big struct initializer,
no more later assignments. Preparation for more upcoming consolidations
via generic macros for simple byteswapping.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
declare variables right where they're needed, don't reuse variables
for several things and scope only short-lived ones.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
And OS/platform callback by which individual server implementations
can extra event polling, eg. device IO.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
New OS/platform callbacks that are called when screens are enabled
or disabled. This allows individual Kdrive implementations to take
specific action, eg. configure/reset graphics hardware.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This header needs to be included in all sources at the very top anyways,
so no need to do it in other headers, too.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
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>