No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Nobody outside tables.c is actually using it, so can be static.
The function used to be _X_EXPORT'ed, but there's no indication that any
external driver (not even proprietary NVidia) ever using it, so we can
get away w/o ABI version bump.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
These values are assigned to `unsigned short` fields, and we're only
getting in smaller numbers that fit well into it. So fixing compiler
warning on type size mismatch by using short args.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Existing client-state hook isn't sufficient for this, and so easy to
be extended cleanly (*1). Adding a new callback is trivial and cheap,
so preferring this way, instead of trying to tweak the existing hook
for something it's never been designed for.
*1) see discussion here: https://github.com/X11Libre/xserver/pull/1077
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
According to linux's Documentation/admin-guide/devices.txt,
framebuffers are named /dev/fb[0-31].
As such, we have to handle 2 digit numbers in framebuffer devices.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
The pci probe was broken already, lots of pci devices were not detected as such.
Since fixing it properly required a bit of extra code complexity,
and those devices would be detected on the fallback probe, I didn't
bother fixing it untill now.
However, there is another problem created by this.
The pci probe was accepting the device passed by the user without
doing any checks on it.
This means that in multi-card setups, fbdevhw might claim the
wrong pci slot.
Fixing this requires fixing the pci probe in order to try and determine
whether the device passed by the user is the same as the pci device
passed to the pci probe.
This commit fixes the pci probe.
If no device is passed by the user, the probe finds a pci framebuffer device.
If a device is passed, the pci probe only return TRUE if the pci device
passed to it is the same as the device passed by the user.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
These xf86_num_platform_devices and xf86_platform_devices fields aren't
_X_EXPORTED, so no drivers can use them - and none are trying so.
Thus move them to internal / non-sdk header.
Not an ABI change.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
We often use very large cursor sizes, compared to the sizes of the
curor glyphs, e.g. 64x64 cursors and 16x16 or smaller glyphs.
This patch makes is so that we only paint the size of the new
cursor glyph and clear the old one if needed, instead of painting
the entire cursor buffer, which is often far larger than the glyphs.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
These are used as counters / sizes, and we're getting lots of warnings
on signedness mismatches. So use size_t instead of (signed) int here.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
It's a counter and size value - we're getting lots of signedness warnings,
so use size_t instead of (signed) int.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Not used anywhere else than just once in this header, so we can directly
inline it. Also adding explicit typecast to silence signedness warning.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The X11 protocol defines the sequenceNumber reply fields as `CARD16`, but the
Xserver is traditionally sloppy and using just `int`. Need to explicitly cast,
in order to silence compiler warnings.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Callers usually need this value as CARD32 (the X11 protocol's native type
of the .length header field), so convert it here in order to reduce
unnecessary compiler warnings.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
strlen() returns an size_t, but the string lengths here is limited to 16bit,
so we need to explictly cast, in order to shut down compiler warning.
Strings longer than 64k really shouldn't ever happen.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>