~ubuntu-branches/ubuntu/precise/xorg-server/precise-updates

« back to all changes in this revision

Viewing changes to xfixes/region.c

Tags: 2:1.10.1-2
* Build xserver-xorg-core-udeb on hurd-i386.  Thanks, Samuel Thibault!
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
757
757
    PicturePtr          pPicture;
758
758
    RegionPtr           pRegion;
759
759
    ScreenPtr           pScreen;
760
 
    PictureScreenPtr    ps;
761
760
    REQUEST(xXFixesSetPictureClipRegionReq);
762
761
    
763
762
    REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq);
764
763
    VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess);
765
764
    pScreen = pPicture->pDrawable->pScreen;
766
 
    ps = GetPictureScreen (pScreen);
767
765
    VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess);
768
766
    
769
767
    return SetPictureClipRegion (pPicture, stuff->xOrigin, stuff->yOrigin,
842
840
    return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
843
841
}
844
842
 
 
843
#ifdef PANORAMIX
 
844
#include "panoramiX.h"
 
845
#include "panoramiXsrv.h"
 
846
 
 
847
int
 
848
PanoramiXFixesSetGCClipRegion (ClientPtr client)
 
849
{
 
850
    REQUEST(xXFixesSetGCClipRegionReq);
 
851
    int             result = Success, j;
 
852
    PanoramiXRes    *gc;
 
853
    REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
 
854
 
 
855
    if ((result = dixLookupResourceByType((void **)&gc, stuff->gc, XRT_GC,
 
856
                                          client, DixWriteAccess))) {
 
857
        client->errorValue = stuff->gc;
 
858
        return result;
 
859
    }
 
860
 
 
861
    FOR_NSCREENS_BACKWARD(j) {
 
862
        stuff->gc = gc->info[j].id;
 
863
        result = (*PanoramiXSaveXFixesVector[X_XFixesSetGCClipRegion]) (client);
 
864
        if(result != Success) break;
 
865
    }
 
866
 
 
867
    return result;
 
868
}
 
869
 
 
870
int
 
871
PanoramiXFixesSetWindowShapeRegion (ClientPtr client)
 
872
{
 
873
    int             result = Success, j;
 
874
    PanoramiXRes    *win;
 
875
    REQUEST(xXFixesSetWindowShapeRegionReq);
 
876
 
 
877
    REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq);
 
878
 
 
879
    if ((result = dixLookupResourceByType((void **)&win, stuff->dest,
 
880
                                          XRT_WINDOW, client,
 
881
                                          DixWriteAccess))) {
 
882
        client->errorValue = stuff->dest;
 
883
        return result;
 
884
    }
 
885
 
 
886
    FOR_NSCREENS_FORWARD(j) {
 
887
        stuff->dest = win->info[j].id;
 
888
        result = (*PanoramiXSaveXFixesVector[X_XFixesSetWindowShapeRegion]) (client);
 
889
        if(result != Success) break;
 
890
    }
 
891
 
 
892
    return result;
 
893
}
 
894
 
 
895
int
 
896
PanoramiXFixesSetPictureClipRegion (ClientPtr client)
 
897
{
 
898
    REQUEST(xXFixesSetPictureClipRegionReq);
 
899
    int             result = Success, j;
 
900
    PanoramiXRes    *pict;
 
901
 
 
902
    REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq);
 
903
 
 
904
    if ((result = dixLookupResourceByType((void **)&pict, stuff->picture,
 
905
                                          XRT_PICTURE, client,
 
906
                                          DixWriteAccess))) {
 
907
        client->errorValue = stuff->picture;
 
908
        return result;
 
909
    }
 
910
 
 
911
    FOR_NSCREENS_BACKWARD(j) {
 
912
        stuff->picture = pict->info[j].id;
 
913
        result = (*PanoramiXSaveXFixesVector[X_XFixesSetPictureClipRegion]) (client);
 
914
        if(result != Success) break;
 
915
    }
 
916
 
 
917
    return result;
 
918
}
 
919
 
 
920
#endif