RANDR: Delivery output property events.
This commit is contained in:
parent
717c7492a0
commit
9187f6ad9e
|
@ -24,10 +24,36 @@
|
||||||
#include "propertyst.h"
|
#include "propertyst.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
|
|
||||||
static void
|
static int
|
||||||
RRDeliverEvent (ScreenPtr pScreen, xEvent *event, CARD32 mask)
|
DeliverPropertyEvent(WindowPtr pWin, void *value)
|
||||||
{
|
{
|
||||||
|
xRROutputPropertyNotifyEvent *event = value;
|
||||||
|
RREventPtr *pHead, pRREvent;
|
||||||
|
ClientPtr client;
|
||||||
|
|
||||||
|
pHead = LookupIDByType(pWin->drawable.id, RREventType);
|
||||||
|
if (!pHead)
|
||||||
|
return WT_WALKCHILDREN;
|
||||||
|
|
||||||
|
for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next)
|
||||||
|
{
|
||||||
|
client = pRREvent->client;
|
||||||
|
if (client == serverClient || client->clientGone)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!(pRREvent->mask & RROutputPropertyNotifyMask))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
event->window = pRREvent->window->drawable.id;
|
||||||
|
WriteEventsToClient(pRREvent->client, 1, (xEvent *)event);
|
||||||
|
}
|
||||||
|
|
||||||
|
return WT_WALKCHILDREN;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void RRDeliverPropertyEvent(ScreenPtr pScreen, xEvent *event)
|
||||||
|
{
|
||||||
|
WalkTree(pScreen, DeliverPropertyEvent, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -45,7 +71,7 @@ RRDeleteAllOutputProperties (RROutputPtr output)
|
||||||
event.state = PropertyDelete;
|
event.state = PropertyDelete;
|
||||||
event.atom = prop->propertyName;
|
event.atom = prop->propertyName;
|
||||||
event.timestamp = currentTime.milliseconds;
|
event.timestamp = currentTime.milliseconds;
|
||||||
RRDeliverEvent (output->pScreen, (xEvent *) &event, RROutputPropertyNotifyMask);
|
RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event);
|
||||||
if (prop->current.data)
|
if (prop->current.data)
|
||||||
xfree(prop->current.data);
|
xfree(prop->current.data);
|
||||||
if (prop->pending.data)
|
if (prop->pending.data)
|
||||||
|
@ -113,7 +139,7 @@ RRDeleteOutputProperty (RROutputPtr output, Atom property)
|
||||||
event.state = PropertyDelete;
|
event.state = PropertyDelete;
|
||||||
event.atom = prop->propertyName;
|
event.atom = prop->propertyName;
|
||||||
event.timestamp = currentTime.milliseconds;
|
event.timestamp = currentTime.milliseconds;
|
||||||
RRDeliverEvent (output->pScreen, (xEvent *) &event, RROutputPropertyNotifyMask);
|
RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event);
|
||||||
RRDestroyOutputProperty (prop);
|
RRDestroyOutputProperty (prop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -238,7 +264,7 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
|
||||||
event.state = PropertyNewValue;
|
event.state = PropertyNewValue;
|
||||||
event.atom = prop->propertyName;
|
event.atom = prop->propertyName;
|
||||||
event.timestamp = currentTime.milliseconds;
|
event.timestamp = currentTime.milliseconds;
|
||||||
RRDeliverEvent (output->pScreen, (xEvent *) &event, RROutputPropertyNotifyMask);
|
RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event);
|
||||||
}
|
}
|
||||||
return(Success);
|
return(Success);
|
||||||
}
|
}
|
||||||
|
@ -707,7 +733,7 @@ ProcRRGetOutputProperty (ClientPtr client)
|
||||||
event.state = PropertyDelete;
|
event.state = PropertyDelete;
|
||||||
event.atom = prop->propertyName;
|
event.atom = prop->propertyName;
|
||||||
event.timestamp = currentTime.milliseconds;
|
event.timestamp = currentTime.milliseconds;
|
||||||
RRDeliverEvent (output->pScreen, (xEvent *) &event, RROutputPropertyNotifyMask);
|
RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
|
|
Loading…
Reference in New Issue