diff --git a/xfixes/select.c b/xfixes/select.c index ebdd77181..660eed210 100644 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -43,7 +43,7 @@ typedef struct _SelectionEvent *SelectionEventPtr; typedef struct _SelectionEvent { SelectionEventPtr next; - Atom selection; + Selection *selection; CARD32 eventMask; ClientPtr pClient; WindowPtr pWindow; @@ -79,14 +79,14 @@ XFixesSelectionCallback(CallbackListPtr *callbacks, void *data, void *args) } UpdateCurrentTimeIf(); for (e = selectionEvents; e; e = e->next) { - if (e->selection == selection->selection && (e->eventMask & eventMask)) { + if (e->selection == selection && (e->eventMask & eventMask)) { xXFixesSelectionNotifyEvent ev = { .type = XFixesEventBase + XFixesSelectionNotify, .subtype = subtype, .window = e->pWindow->drawable.id, .owner = (subtype == XFixesSetSelectionOwnerNotify) ? selection->window : 0, - .selection = e->selection, + .selection = e->selection->selection, .timestamp = currentTime.milliseconds, .selectionTimestamp = selection->lastTimeChanged.milliseconds }; @@ -120,13 +120,14 @@ CheckSelectionCallback(void) static int XFixesSelectSelectionInput(ClientPtr pClient, - Atom selection, WindowPtr pWindow, CARD32 eventMask) + Atom selection_name, WindowPtr pWindow, CARD32 eventMask) { void *val; int rc; SelectionEventPtr *prev, e; + Selection *selection; - rc = XaceHook(XACE_SELECTION_ACCESS, pClient, selection, DixGetAttrAccess); + rc = dixLookupSelection(&selection, selection_name, pClient, DixGetAttrAccess); if (rc != Success) return rc;