From dbe8d03c42f01332b3dc41fe9290aed142f1436f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 16 Feb 2016 20:03:57 -0800 Subject: 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 Reviewed-by: Dave Airlie --- randr/rrmonitor.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'randr') diff --git a/randr/rrmonitor.c b/randr/rrmonitor.c index 58041bb61..ba310eaa4 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; } -- cgit v1.2.3