xfree86: compat: re-export DeliverEvents() for horryibly maintained Nvidia

NVidia yet again doing crazy shit in their proprietary drivers:
Video drivers have no business with directly send messages to clients.

For whatever weird reasons they have their own RandR extension implementation
(that's competing with the Xserver's one) *within* the video driver.

Let that sink in! Insane.

At some point one might ask the question why they're not forking the whole
Xserver itself (they once did, back in the 90s)

But still trying to be kind with Nvidia victims, thus adding a little wrapper
function under the old name. It spills out a log warning calling users to file
bug reports their driver vendor.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-06-02 18:32:07 +02:00
parent bd3232404b
commit aa49563def
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,30 @@
#include <dix-config.h>
#include <X11/Xfuncproto.h>
#include "dix/dix_priv.h"
/*
* this is specifically for NVidia proprietary driver: they're again lagging
* behind a year, doing at least some minimal cleanup of their code base.
* All attempts to get in direct contact with them have failed.
*/
_X_EXPORT enum EventDeliveryState DeliverEvents(WindowPtr pWindow,
xEventPtr events,
size_t nEvents,
WindowPtr otherParent);
enum EventDeliveryState DeliverEvents(WindowPtr pWindow,
xEventPtr events,
size_t nEvents,
WindowPtr otherParent)
{
LogMessageVerb(X_WARNING, 0, "Bogus driver calling DIX-internal function DeliverEvents() !\n");
LogMessageVerb(X_WARNING, 0, "External drivers really should never ever call this function.\n");
LogMessageVerb(X_WARNING, 0, "File a bug report to driver vendor or use a FOSS driver.\n");
LogMessageVerb(X_WARNING, 0, "Proprietary drivers are inherently unstable, they just can't be done right.\n");
LogMessageVerb(X_WARNING, 0, "And just don't buy Nvidia hardware, ever.\n");
return dixDeliverEvents(pWindow, events, nEvents, otherParent);
}

View File

@ -1,5 +1,6 @@
srcs_xorg_compat = [
'clientexception.c',
'deliverevents.c',
'log.c',
'ones.c',
'xf86Helper.c',