[PATCH] Initialize all screens

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Wed Sep 28 03:17:38 PDT 2011


---
 dix/devices.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dix/devices.c b/dix/devices.c
index 0ccf252..644e3e7 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -351,6 +351,7 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
     DeviceIntPtr other;
     BOOL enabled;
     int flags[MAXDEVICES] = {0};
+    int i;
 
     for (prev = &inputInfo.off_devices;
 	 *prev && (*prev != dev);
@@ -364,9 +365,13 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
             /* Sprites appear on first root window, so we can hardcode it */
             if (dev->spriteInfo->spriteOwner)
             {
-                InitializeSprite(dev, screenInfo.screens[0]->root);
+                /* Initialize all screens */
+                for(i=0; i < screenInfo.numScreens; i++)
+                {
+                    InitializeSprite(dev, screenInfo.screens[i]->root);
                                                  /* mode doesn't matter */
-                EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor);
+                    EnterWindow(dev, screenInfo.screens[i]->root, NotifyAncestor);
+                }
             }
             else if ((other = NextFreePointerDevice()) == NULL)
             {
-- 
1.7.4.1


--------------060108060204090000090705--


More information about the xorg-devel mailing list