From b6cf889af45c31b650428e4dbe476daf21be3c9e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 25 Oct 2022 15:09:43 -0700 Subject: [PATCH] Use ScreenCount() instead of SDL_GetNumVideoDisplays() The limitation appears to be specific to multi-screen setups --- src/video/x11/SDL_x11mouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11mouse.c b/src/video/x11/SDL_x11mouse.c index 04c5b8c478..96a25a2b9e 100644 --- a/src/video/x11/SDL_x11mouse.c +++ b/src/video/x11/SDL_x11mouse.c @@ -320,7 +320,7 @@ WarpMouseInternal(Window xwindow, const int x, const int y) /* It seems XIWarpPointer() doesn't work correctly on multi-head setups: * https://developer.blender.org/rB165caafb99c6846e53d11c4e966990aaffc06cea */ - if (SDL_GetNumVideoDisplays() == 1) { + if (ScreenCount(display) == 1) { X11_XIGetClientPointer(display, None, &deviceid); } if (deviceid != 0) {