diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-22 00:26:28 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-06-03 14:03:23 -0700 |
commit | e7fae9ecc42ab5e73b89117722dbf4117d928f9a (patch) | |
tree | b7897e7a64fe01e3989ec1e7a5a7db69797126e6 /Xi | |
parent | 80b5d3a3264d2c5167e5ac85a3b04af0f89cece1 (diff) |
Move each screen's root-window pointer into ScreenRec.
Many references to the WindowTable array already had the corresponding
screen pointer handy, which meant they usually looked like
"WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of
keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.
Since dix uses this data, a screen private entry isn't appropriate.
xf86-video-dummy currently uses WindowTable, so it needs to be updated
to reflect this change.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/closedev.c | 2 | ||||
-rw-r--r-- | Xi/exevents.c | 6 | ||||
-rw-r--r-- | Xi/xichangecursor.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Xi/closedev.c b/Xi/closedev.c index 159ead55c..e319c737a 100644 --- a/Xi/closedev.c +++ b/Xi/closedev.c @@ -156,7 +156,7 @@ ProcXCloseDevice(ClientPtr client) * Delete passive grabs from all windows for this device. */ for (i = 0; i < screenInfo.numScreens; i++) { - pWin = WindowTable[i]; + pWin = screenInfo.screens[i]->root; DeleteDeviceEvents(d, pWin, client); p1 = pWin->firstChild; DeleteEventsFromChildren(d, p1, client); diff --git a/Xi/exevents.c b/Xi/exevents.c index 41b396c28..56d9bf7fd 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -926,7 +926,7 @@ ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device) } for (i = 0; i < screenInfo.numScreens; i++) - DeliverEventsToWindow(device, WindowTable[i], xi, 1, + DeliverEventsToWindow(device, screenInfo.screens[i]->root, xi, 1, GetEventFilter(device, xi), NULL); free(xi); } @@ -1042,7 +1042,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) /* see comment in EnqueueEvents regarding the next three lines */ if (ev->any.type == ET_Motion) - ev->device_event.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; + ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id; eventinfo.device = device; eventinfo.event = ev; @@ -2120,7 +2120,7 @@ SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count) WindowPtr pWin, p1; for (i = 0; i < screenInfo.numScreens; i++) { - pWin = WindowTable[i]; + pWin = screenInfo.screens[i]->root; if (!pWin) continue; DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab); diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c index e72cfac03..215339331 100644 --- a/Xi/xichangecursor.c +++ b/Xi/xichangecursor.c @@ -93,7 +93,7 @@ int ProcXIChangeCursor(ClientPtr client) if (stuff->cursor == None) { - if (pWin == WindowTable[pWin->drawable.pScreen->myNum]) + if (pWin == pWin->drawable.pScreen->root) pCursor = rootCursor; else pCursor = (CursorPtr)None; |