diff --git a/hw/xfree86/compat/clientexception.c b/hw/xfree86/compat/clientexception.c new file mode 100644 index 000000000..6005f22c4 --- /dev/null +++ b/hw/xfree86/compat/clientexception.c @@ -0,0 +1,24 @@ +#include + +#include + +#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 void MarkClientException(ClientPtr pClient); + +void MarkClientException(ClientPtr pClient) +{ + LogMessageVerb(X_WARNING, 0, "Bogus driver calling DIX-internal function MarkClientException() !\n"); + LogMessageVerb(X_WARNING, 0, "External drivers really should never ever call this function.\n"); + LogMessageVerb(X_WARNING, 0, "Nor should they ever DIX-internal fields like ClientRec->noClientException\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"); + + dixMarkClientException(pClient); +} diff --git a/hw/xfree86/compat/meson.build b/hw/xfree86/compat/meson.build index dcdbf1c21..fab631ca2 100644 --- a/hw/xfree86/compat/meson.build +++ b/hw/xfree86/compat/meson.build @@ -1,8 +1,10 @@ srcs_xorg_compat = [ + 'clientexception.c', 'log.c', ] xorg_compat = static_library('xorg_compat', srcs_xorg_compat, + dependencies: common_dep, include_directories: [inc, xorg_inc, top_dir_inc], )