[PATCH xf86-video-nested v4 08/11] Remove expurious <default pointer> device when using nested input.

Laércio de Sousa laerciosousa at sme-mogidascruzes.sp.gov.br
Fri Nov 13 10:28:08 PST 2015


Because nestedinput is currently not recognized by Xorg as a suitable core pointer,
it will automatically add "<default pointer>", with devpath /dev/input/mice and
"mouse" driver, which may interfere with nested virtual pointer device.

Signed-off-by: Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>
---
 src/nested_input.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/nested_input.c b/src/nested_input.c
index 39f696f..9a6303e 100644
--- a/src/nested_input.c
+++ b/src/nested_input.c
@@ -357,7 +357,8 @@ NestedInputLoadDriver(NestedClientPrivatePtr clientData) {
     InputOption* options = NULL;
     options = input_option_new(options, "Identifier", "Nested virtual generic input device");
     options = input_option_new(options, "Driver", "nestedinput");
-    
+    options = input_option_new(options, "CorePointer", "on");
+ 
     // Invoke NewInputDeviceRequest to call the PreInit function of
     // the driver.
     int ret = NewInputDeviceRequest(options, NULL, &dev);
@@ -378,6 +379,13 @@ NestedInputLoadDriver(NestedClientPrivatePtr clientData) {
     // Send the device to the client so that the client can send the
     // device back to the input driver when events are being posted.
     NestedClientSetDevicePtr(clientData, dev);
+
+    /* XXX: Find a better way to make Xorg recognize nestedinput
+     *      as the first core pointer. */
+    pInfo = xf86LookupInput("<default pointer>");
+    
+    if (pInfo)
+        DeleteInputDeviceRequest(pInfo->dev);
 }
     
 void
-- 
2.1.4



More information about the xorg-devel mailing list