randr: Send ConfigNotify when manual monitor list changes

This lets clients know that the layout of the monitors on the screen
has changed so they can adapt appropriately.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Keith Packard 2016-02-16 20:03:57 -08:00
parent eddf848c44
commit dbe8d03c42

View File

@ -721,7 +721,9 @@ ProcRRSetMonitor(ClientPtr client)
monitor->geometry.mmHeight = stuff->monitor.heightInMillimeters; monitor->geometry.mmHeight = stuff->monitor.heightInMillimeters;
r = RRMonitorAdd(client, screen, monitor); r = RRMonitorAdd(client, screen, monitor);
if (r != Success) if (r == Success)
RRSendConfigNotify(screen);
else
RRMonitorFree(monitor); RRMonitorFree(monitor);
return r; return r;
} }
@ -745,5 +747,8 @@ ProcRRDeleteMonitor(ClientPtr client)
return BadAtom; return BadAtom;
} }
return RRMonitorDelete(client, screen, stuff->name); r = RRMonitorDelete(client, screen, stuff->name);
if (r == Success)
RRSendConfigNotify(screen);
return r;
} }