forked from Mirrorlandia_minetest/irrlicht
Avoid using XIWarpPointer on certain setups where it's broken
fixes minetest/minetest#12697
This commit is contained in:
parent
d733e03430
commit
e9f205f952
@ -2118,7 +2118,17 @@ CIrrDeviceLinux::CCursorControl::CCursorControl(CIrrDeviceLinux* dev, bool null)
|
|||||||
if (!Null)
|
if (!Null)
|
||||||
{
|
{
|
||||||
#ifdef _IRR_LINUX_X11_XINPUT2_
|
#ifdef _IRR_LINUX_X11_XINPUT2_
|
||||||
|
// XIWarpPointer is entirely broken on multi-head setups (see also [1]),
|
||||||
|
// but behaves better in other cases so we can't just disable it outright.
|
||||||
|
// [1] https://developer.blender.org/rB165caafb99c6846e53d11c4e966990aaffc06cea
|
||||||
|
if (XScreenCount(Device->XDisplay) > 1)
|
||||||
|
{
|
||||||
|
os::Printer::log("Detected classic multi-head setup, not using XIWarpPointer");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
XIGetClientPointer(Device->XDisplay, Device->XWindow, &DeviceId);
|
XIGetClientPointer(Device->XDisplay, Device->XWindow, &DeviceId);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
XGCValues values;
|
XGCValues values;
|
||||||
|
Loading…
Reference in New Issue
Block a user