mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-05 22:46:06 +00:00
panoramiX: consolidate common id assignment code.
This adds a new FOR_NSCREENS_FORWARD_SKIP, which skips the first element and is a common idiom throughout panoramiX code. It then adds a new inline function to hide id assignment to a panoramiX resource and cleans up lots of common repeated code. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
c48c530e54
commit
5a94934487
6 changed files with 25 additions and 43 deletions
|
|
@ -703,10 +703,7 @@ PanoramiXCompositeNameWindowPixmap (ClientPtr client)
|
|||
|
||||
newPix->type = XRT_PIXMAP;
|
||||
newPix->u.pix.shared = FALSE;
|
||||
newPix->info[0].id = stuff->pixmap;
|
||||
|
||||
for (i = 1; i < PanoramiXNumScreens; i++)
|
||||
newPix->info[i].id = FakeClientID (client->index);
|
||||
panoramix_setup_ids(newPix, client, stuff->pixmap);
|
||||
|
||||
FOR_NSCREENS(i) {
|
||||
rc = dixLookupResourceByType ((void **) &pWin, win->info[i].id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue