[PATCH xserver v2 1/5] dix: Pass the whole property into deliverPropertyNotifyEvent

Pekka Paalanen ppaalanen at gmail.com
Fri Dec 9 12:24:12 UTC 2016


From: Adam Jackson <ajax at redhat.com>

Instead of just the atom.  No functional change.

Signed-off-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 dix/property.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/dix/property.c b/dix/property.c
index fa4da2d..3447bca 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -106,14 +106,14 @@ dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName,
 }
 
 static void
-deliverPropertyNotifyEvent(WindowPtr pWin, int state, Atom atom)
+deliverPropertyNotifyEvent(WindowPtr pWin, int state, PropertyPtr pProp)
 {
     xEvent event;
     UpdateCurrentTimeIf();
     event = (xEvent) {
         .u.property.window = pWin->drawable.id,
         .u.property.state = state,
-        .u.property.atom = atom,
+        .u.property.atom = pProp->propertyName,
         .u.property.time = currentTime.milliseconds,
     };
     event.u.u.type = PropertyNotify;
@@ -175,7 +175,7 @@ ProcRotateProperties(ClientPtr client)
             delta += stuff->nAtoms;
         for (i = 0; i < stuff->nAtoms; i++) {
             j = (i + delta) % stuff->nAtoms;
-            deliverPropertyNotifyEvent(pWin, PropertyNewValue, atoms[i]);
+            deliverPropertyNotifyEvent(pWin, PropertyNewValue, props[i]);
 
             /* Preserve name and devPrivates */
             props[j]->type = saved[i].type;
@@ -351,7 +351,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
         return rc;
 
     if (sendevent)
-        deliverPropertyNotifyEvent(pWin, PropertyNewValue, pProp->propertyName);
+        deliverPropertyNotifyEvent(pWin, PropertyNewValue, pProp);
 
     return Success;
 }
@@ -380,7 +380,7 @@ DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName)
             prevProp->next = pProp->next;
         }
 
-        deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName);
+        deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp);
         free(pProp->data);
         dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY);
     }
@@ -394,7 +394,7 @@ DeleteAllWindowProperties(WindowPtr pWin)
 
     pProp = wUserProps(pWin);
     while (pProp) {
-        deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName);
+        deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp);
         pNextProp = pProp->next;
         free(pProp->data);
         dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY);
@@ -517,7 +517,7 @@ ProcGetProperty(ClientPtr client)
     };
 
     if (stuff->delete && (reply.bytesAfter == 0))
-        deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName);
+        deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp);
 
     WriteReplyToClient(client, sizeof(xGenericReply), &reply);
     if (len) {
-- 
2.7.3



More information about the xorg-devel mailing list