mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-04 21:10:26 +01:00
Add panoramix support to XFixes extension.
This commit is contained in:
parent
e21420c786
commit
583f4dde81
4 changed files with 136 additions and 0 deletions
|
|
@ -56,6 +56,9 @@ Equipment Corporation.
|
|||
#ifdef RENDER
|
||||
#include "picturestr.h"
|
||||
#endif
|
||||
#ifdef XFIXES
|
||||
#include "xfixesint.h"
|
||||
#endif
|
||||
#include "modinit.h"
|
||||
|
||||
|
||||
|
|
@ -582,6 +585,9 @@ void PanoramiXExtensionInit(int argc, char *argv[])
|
|||
#ifdef RENDER
|
||||
PanoramiXRenderInit ();
|
||||
#endif
|
||||
#ifdef XFIXES
|
||||
PanoramiXFixesInit ();
|
||||
#endif
|
||||
}
|
||||
|
||||
extern Bool CreateConnectionBlock(void);
|
||||
|
|
@ -883,6 +889,9 @@ static void PanoramiXResetProc(ExtensionEntry* extEntry)
|
|||
|
||||
#ifdef RENDER
|
||||
PanoramiXRenderReset ();
|
||||
#endif
|
||||
#ifdef XFIXES
|
||||
PanoramiXFixesReset ();
|
||||
#endif
|
||||
screenInfo.numScreens = PanoramiXNumScreens;
|
||||
for (i = 256; i--; )
|
||||
|
|
|
|||
81
xfixes/region.c
Normal file → Executable file
81
xfixes/region.c
Normal file → Executable file
|
|
@ -864,3 +864,84 @@ SProcXFixesExpandRegion (ClientPtr client)
|
|||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
#include "panoramiXsrv.h"
|
||||
|
||||
#define VERIFY_XIN_PICTURE(pPicture, pid, client, mode, err) {\
|
||||
pPicture = SecurityLookupIDByType(client, pid, XRT_PICTURE, mode);\
|
||||
if (!pPicture) { \
|
||||
client->errorValue = pid; \
|
||||
return err; \
|
||||
} \
|
||||
}
|
||||
|
||||
extern unsigned long XRT_PICTURE;
|
||||
|
||||
extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests])(ClientPtr);
|
||||
|
||||
int
|
||||
PanoramiXFixesSetGCClipRegion (ClientPtr client)
|
||||
{
|
||||
REQUEST(xXFixesSetGCClipRegionReq);
|
||||
int result = Success, j;
|
||||
PanoramiXRes *gc;
|
||||
REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
|
||||
|
||||
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
|
||||
client, stuff->gc, XRT_GC, DixReadAccess)))
|
||||
return BadGC;
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->gc = gc->info[j].id;
|
||||
result = (*PanoramiXSaveXFixesVector[X_XFixesSetGCClipRegion]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
int
|
||||
PanoramiXFixesSetWindowShapeRegion (ClientPtr client)
|
||||
{
|
||||
int result = Success, j;
|
||||
PanoramiXRes *win;
|
||||
REQUEST(xXFixesSetWindowShapeRegionReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq);
|
||||
|
||||
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
|
||||
client, stuff->dest, XRT_WINDOW, DixWriteAccess)))
|
||||
return BadWindow;
|
||||
|
||||
FOR_NSCREENS_FORWARD(j) {
|
||||
stuff->dest = win->info[j].id;
|
||||
result = (*PanoramiXSaveXFixesVector[X_XFixesSetWindowShapeRegion]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
int
|
||||
PanoramiXFixesSetPictureClipRegion (ClientPtr client)
|
||||
{
|
||||
REQUEST(xXFixesSetPictureClipRegionReq);
|
||||
int result = Success, j;
|
||||
PanoramiXRes *pict;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq);
|
||||
|
||||
VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess,
|
||||
RenderErrBase + BadPicture);
|
||||
|
||||
FOR_NSCREENS_BACKWARD(j) {
|
||||
stuff->picture = pict->info[j].id;
|
||||
result = (*PanoramiXSaveXFixesVector[X_XFixesSetPictureClipRegion]) (client);
|
||||
if(result != Success) break;
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
30
xfixes/xfixes.c
Normal file → Executable file
30
xfixes/xfixes.c
Normal file → Executable file
|
|
@ -261,3 +261,33 @@ XFixesExtensionInit(void)
|
|||
(EventSwapPtr) SXFixesCursorNotifyEvent;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
|
||||
int (*PanoramiXSaveXFixesVector[XFixesNumberRequests])(ClientPtr);
|
||||
|
||||
void
|
||||
PanoramiXFixesInit (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < XFixesNumberRequests; i++)
|
||||
PanoramiXSaveXFixesVector[i] = ProcXFixesVector[i];
|
||||
/*
|
||||
* Stuff in Xinerama aware request processing hooks
|
||||
*/
|
||||
ProcXFixesVector[X_XFixesSetGCClipRegion] = PanoramiXFixesSetGCClipRegion;
|
||||
ProcXFixesVector[X_XFixesSetWindowShapeRegion] = PanoramiXFixesSetWindowShapeRegion;
|
||||
ProcXFixesVector[X_XFixesSetPictureClipRegion] = PanoramiXFixesSetPictureClipRegion;
|
||||
}
|
||||
|
||||
void
|
||||
PanoramiXFixesReset (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < XFixesNumberRequests; i++)
|
||||
ProcXFixesVector[i] = PanoramiXSaveXFixesVector[i];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
16
xfixes/xfixesint.h
Normal file → Executable file
16
xfixes/xfixesint.h
Normal file → Executable file
|
|
@ -255,6 +255,17 @@ ProcXFixesExpandRegion (ClientPtr client);
|
|||
int
|
||||
SProcXFixesExpandRegion (ClientPtr client);
|
||||
|
||||
#ifdef PANORAMIX
|
||||
int
|
||||
PanoramiXFixesSetGCClipRegion (ClientPtr client);
|
||||
|
||||
int
|
||||
PanoramiXFixesSetWindowShapeRegion (ClientPtr client);
|
||||
|
||||
int
|
||||
PanoramiXFixesSetPictureClipRegion (ClientPtr client);
|
||||
#endif
|
||||
|
||||
/* Cursor Visibility (Version 4) */
|
||||
|
||||
int
|
||||
|
|
@ -269,4 +280,9 @@ ProcXFixesShowCursor (ClientPtr client);
|
|||
int
|
||||
SProcXFixesShowCursor (ClientPtr client);
|
||||
|
||||
#ifdef PANORAMIX
|
||||
void PanoramiXFixesInit (void);
|
||||
void PanoramiXFixesReset (void);
|
||||
#endif
|
||||
|
||||
#endif /* _XFIXESINT_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue