[PATCH xserver] randr: Send ConfigNotify when manual monitor list changes

Dave Airlie airlied at gmail.com
Wed Feb 17 04:40:41 UTC 2016


On 17 February 2016 at 14:04, Keith Packard <keithp at keithp.com> wrote:
> This lets clients know that the layout of the monitors on the screen
> has changed so they can adapt appropriately.
>

Seems like a good thing to do.

Reviewed-by: Dave Airlie <airlied at redhat.com>

> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  randr/rrmonitor.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/randr/rrmonitor.c b/randr/rrmonitor.c
> index c37dcf8..f8743d0 100644
> --- a/randr/rrmonitor.c
> +++ b/randr/rrmonitor.c
> @@ -721,7 +721,9 @@ ProcRRSetMonitor(ClientPtr client)
>      monitor->geometry.mmHeight = stuff->monitor.heightInMillimeters;
>
>      r = RRMonitorAdd(client, screen, monitor);
> -    if (r != Success)
> +    if (r == Success)
> +        RRSendConfigNotify(screen);
> +    else
>          RRMonitorFree(monitor);
>      return r;
>  }
> @@ -745,5 +747,8 @@ ProcRRDeleteMonitor(ClientPtr client)
>          return BadAtom;
>      }
>
> -    return RRMonitorDelete(client, screen, stuff->name);
> +    r = RRMonitorDelete(client, screen, stuff->name);
> +    if (r == Success)
> +        RRSendConfigNotify(screen);
> +    return r;
>  }
> --
> 2.7.0
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list