[PATCH xserver] randr: Send ConfigNotify when manual monitor list changes
Keith Packard
keithp at keithp.com
Wed Feb 17 04:04:49 UTC 2016
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 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
More information about the xorg-devel
mailing list