[PATCH v3 xf86-video-nested 07/10] Don't load nested input driver if Xorg is started with option "-seat (...)"
Laércio de Sousa
laerciosousa at sme-mogidascruzes.sp.gov.br
Mon Nov 9 09:22:35 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 cafa895..9fb4334 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -183,6 +183,8 @@ typedef struct NestedPrivate {
ShadowUpdateProc update;
} NestedPrivate, *NestedPrivatePtr;
+Bool enableNestedInput;
+
#define PNESTED(p) ((NestedPrivatePtr)((p)->driverPrivate))
#define PCLIENTDATA(p) (PNESTED(p)->clientData)
@@ -192,12 +194,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)
@@ -635,7 +641,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