diff options
author | Adam Jackson <ajax@redhat.com> | 2014-07-12 12:45:23 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-02-23 13:30:11 -0500 |
commit | 8e3f9ce6c06e7605832c55dfd180396f66ec8b66 (patch) | |
tree | 5b0f88a17c151dd14a916c3544e221fc30c98f2b /dix | |
parent | 50bcea8be337ea983e464f2b5b8b2dc6d1024532 (diff) |
dix: Add a callback chain for window property state change
This will be used by in-server features that need to react to property
changes. The first one will be _XWAYLAND_ALLOW_COMMITS.
Signed-off-by: Adam Jackson <ajax@redhat.com>
[Pekka: add commit message body]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/property.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dix/property.c b/dix/property.c index 3447bca89..ff1d6693b 100644 --- a/dix/property.c +++ b/dix/property.c @@ -105,10 +105,17 @@ dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName, return rc; } +CallbackListPtr PropertyStateCallback; + static void deliverPropertyNotifyEvent(WindowPtr pWin, int state, PropertyPtr pProp) { xEvent event; + PropertyStateRec rec = { + .win = pWin, + .prop = pProp, + .state = state + }; UpdateCurrentTimeIf(); event = (xEvent) { .u.property.window = pWin->drawable.id, @@ -117,6 +124,8 @@ deliverPropertyNotifyEvent(WindowPtr pWin, int state, PropertyPtr pProp) .u.property.time = currentTime.milliseconds, }; event.u.u.type = PropertyNotify; + + CallCallbacks(&PropertyStateCallback, &rec); DeliverEvents(pWin, &event, 1, (WindowPtr) NULL); } |