xace: add hooks + new access codes: XFixes extension.

Required a new name argument to the selection access hook to handle
XFixesSelectSelectionInput.
This commit is contained in:
Eamon Walsh 2007-08-30 11:48:45 -04:00 committed by Eamon Walsh
commit cda92bbf12
7 changed files with 87 additions and 47 deletions

View file

@ -25,6 +25,7 @@
#endif
#include "xfixesint.h"
#include "xace.h"
static RESTYPE SelectionClientType, SelectionWindowType;
static Bool SelectionCallbackRegistered = FALSE;
@ -131,8 +132,14 @@ XFixesSelectSelectionInput (ClientPtr pClient,
WindowPtr pWindow,
CARD32 eventMask)
{
int rc;
SelectionEventPtr *prev, e;
rc = XaceHook(XACE_SELECTION_ACCESS, pClient, selection, NULL,
DixGetAttrAccess);
if (rc != Success)
return rc;
for (prev = &selectionEvents; (e = *prev); prev = &e->next)
{
if (e->selection == selection &&
@ -196,7 +203,7 @@ ProcXFixesSelectSelectionInput (ClientPtr client)
int rc;
REQUEST_SIZE_MATCH (xXFixesSelectSelectionInputReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess);
if (rc != Success)
return rc;
if (stuff->eventMask & ~SelectionAllEvents)