[PATCH 1/2] dix: Add PostDispatchCallback

Alex Deucher alexdeucher at gmail.com
Wed Oct 2 09:06:35 PDT 2013


On Wed, Oct 2, 2013 at 11:56 AM, Adam Jackson <ajax at redhat.com> wrote:

maybe mention in the commit message that this is required to xineramify damage?

Alex

> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  dix/dispatch.c      | 5 ++++-
>  include/dixstruct.h | 1 +
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/dix/dispatch.c b/dix/dispatch.c
> index 71fda48..59ba011 100644
> --- a/dix/dispatch.c
> +++ b/dix/dispatch.c
> @@ -167,6 +167,7 @@ static int nextFreeClientID;    /* always MIN free client ID */
>  static int nClients;            /* number of authorized clients */
>
>  CallbackListPtr ClientStateCallback;
> +CallbackListPtr PostDispatchCallback;
>
>  /* dispatchException & isItTimeToYield must be declared volatile since they
>   * are modified by signal handlers - otherwise optimizer may assume it doesn't
> @@ -428,9 +429,11 @@ Dispatch(void)
>                      result = BadLength;
>                  else {
>                      result = XaceHookDispatch(client, client->majorOp);
> -                    if (result == Success)
> +                    if (result == Success) {
>                          result =
>                              (*client->requestVector[client->majorOp]) (client);
> +                        CallCallbacks(&PostDispatchCallback, &result);
> +                    }
>                      XaceHookAuditEnd(client, result);
>                  }
>  #ifdef XSERVER_DTRACE
> diff --git a/include/dixstruct.h b/include/dixstruct.h
> index aef822c..4830ce0 100644
> --- a/include/dixstruct.h
> +++ b/include/dixstruct.h
> @@ -39,6 +39,7 @@ SOFTWARE.
>   */
>
>  extern _X_EXPORT CallbackListPtr ClientStateCallback;
> +extern _X_EXPORT CallbackListPtr PostDispatchCallback;
>
>  typedef struct {
>      ClientPtr client;
> --
> 1.8.3.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list