summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-02-16 20:03:57 -0800
committerKeith Packard <keithp@keithp.com>2016-02-16 20:56:39 -0800
commitdbe8d03c42f01332b3dc41fe9290aed142f1436f (patch)
tree441c5e6146ba805c562fafaef9351100121f25c4 /randr
parenteddf848c44349c7ebc7da9957bffb3630f3faaa9 (diff)
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>
Diffstat (limited to 'randr')
-rw-r--r--randr/rrmonitor.c9
1 files changed, 7 insertions, 2 deletions
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;
}