diff --git a/dix/input_priv.h b/dix/input_priv.h index e91054e83..cf9f12f20 100644 --- a/dix/input_priv.h +++ b/dix/input_priv.h @@ -417,4 +417,15 @@ void DeliverRawEvent(RawDeviceEvent *event, DeviceIntPtr device) */ extern CallbackListPtr DeviceEventCallback; +/* + * @brief pick an appropriate pointer for the given client. + * + * An "appropriate device" is (in order of priority): + * 1) A device the given client has a core grab on. + * 2) A device set as ClientPointer for the given client. + * 3) The first master device. + */ +DeviceIntPtr PickPointer(ClientPtr pClient) + _X_ATTRIBUTE_NONNULL_ARG(1); + #endif /* _XSERVER_INPUT_PRIV_H */ diff --git a/include/dix.h b/include/dix.h index 52baf2021..0695a5971 100644 --- a/include/dix.h +++ b/include/dix.h @@ -260,9 +260,6 @@ WriteEventsToClient(ClientPtr /*pClient */ , int /*count */ , xEventPtr /*events */ ); -extern _X_EXPORT DeviceIntPtr -PickPointer(ClientPtr /* client */ ); - extern _X_EXPORT DeviceIntPtr PickKeyboard(ClientPtr /* client */ ); diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 8ca92bd15..ea4e678cc 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -58,6 +58,7 @@ DEALINGS IN THE SOFTWARE. #define XK_CYRILLIC #include +#include "dix/input_priv.h" #include "xkb/xkbsrv_priv.h" #include "os.h"