[kdrive/ephyr,RFC] ephyr: move SetNotifyFd()/RemoveNotifyFd() calls outside ephyr mouse driver

Submitted by Laércio de Sousa on May 10, 2016, 11:31 a.m.

Details

Message ID 1462879916-15227-1-git-send-email-laerciosousa@sme-mogidascruzes.sp.gov.br
State RFC
Headers show
Series "ephyr: move SetNotifyFd()/RemoveNotifyFd() calls outside ephyr mouse driver" ( rev: 1 ) in X.org (DEPRECATED - USE GITLAB)

Not browsing as part of any series.

Commit Message

Laércio de Sousa May 10, 2016, 11:31 a.m.
When Xephyr is launched in multi-seat mode (i.e. with command-line option
"-seat seatXXXX"), ephyr virtual keyboard/mouse driver is not loaded.

Without this patch, Xephyr won't listen to any events in multi-seat mode,
including XCB_EXPOSE and XCB_CONFIGURE_NOTIFY, which may be needed even
for this mode.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
---
 hw/kdrive/ephyr/ephyr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index f6897cc..9eae0c7 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -709,6 +709,7 @@  ephyrPreserve(KdCardInfo * card)
 Bool
 ephyrEnable(ScreenPtr pScreen)
 {
+    SetNotifyFd(hostx_get_fd(), ephyrXcbNotify, X_NOTIFY_READ, NULL);
     return TRUE;
 }
 
@@ -721,6 +722,7 @@  ephyrDPMS(ScreenPtr pScreen, int mode)
 void
 ephyrDisable(ScreenPtr pScreen)
 {
+    RemoveNotifyFd(hostx_get_fd());
 }
 
 void
@@ -1257,7 +1259,6 @@  static Status
 MouseEnable(KdPointerInfo * pi)
 {
     ((EphyrPointerPrivate *) pi->driverPrivate)->enabled = TRUE;
-    SetNotifyFd(hostx_get_fd(), ephyrXcbNotify, X_NOTIFY_READ, NULL);
     return Success;
 }
 
@@ -1265,7 +1266,6 @@  static void
 MouseDisable(KdPointerInfo * pi)
 {
     ((EphyrPointerPrivate *) pi->driverPrivate)->enabled = FALSE;
-    RemoveNotifyFd(hostx_get_fd());
     return;
 }