[PATCH xf86-video-nested v4 07/11] Don't load nested input driver if Xorg is started with option "-seat (...)"

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


When used for single-GPU multi-seat purposes, there's no need to
load nestedinput driver, since nested Xorg will grab input devices
assigned to the seat in question.

Signed-off-by: Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>

Conflicts:
	src/driver.c
---
 src/driver.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/driver.c b/src/driver.c
index 8aa53b2..2d5f9a5 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -181,6 +181,8 @@ typedef struct NestedPrivate {
     ShadowUpdateProc update;
 } NestedPrivate, *NestedPrivatePtr;
 
+Bool enableNestedInput;
+
 #define PNESTED(p) ((NestedPrivatePtr)((p)->driverPrivate))
 #define PCLIENTDATA(p) (PNESTED(p)->clientData)
 
@@ -190,12 +192,16 @@ static pointer
 NestedSetup(pointer module, pointer opts, int *errmaj, int *errmin) {
     static Bool setupDone = FALSE;
 
+    enableNestedInput = !SeatId;
+
     if (!setupDone) {
         setupDone = TRUE;
-        
+
         xf86AddDriver(&NESTED, module, HaveDriverFuncs);
-        xf86AddInputDriver(&NESTEDINPUT, module, 0);
-        
+
+        if (enableNestedInput)
+            xf86AddInputDriver(&NESTEDINPUT, module, 0);
+
         return (pointer)1;
     } else {
         if (errmaj)
@@ -634,7 +640,9 @@ static Bool NestedScreenInit(SCREEN_INIT_ARGS_DECL)
     
     // Schedule the NestedInputLoadDriver function to load once the
     // input core is initialized.
-    TimerSet(NULL, 0, 1, NestedMouseTimer, pNested->clientData);
+
+    if (enableNestedInput)
+        TimerSet(NULL, 0, 1, NestedMouseTimer, pNested->clientData);
 
     miClearVisualTypes();
     if (!miSetVisualTypesAndMasks(pScrn->depth,
-- 
2.1.4



More information about the xorg-devel mailing list