sync with OpenBSD -current

This commit is contained in:
purplerain 2024-01-28 20:25:20 +00:00
parent 40c5de4fdf
commit 28b8e7f357
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
47 changed files with 12974 additions and 10842 deletions

View file

@ -518,7 +518,6 @@ RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor)
for (m = 0; m < pScrPriv->numMonitors; m++) {
RRMonitorPtr existing = pScrPriv->monitors[m];
int o, eo;
/* If 'name' matches an existing Monitor on the screen, the
* existing one will be deleted as if RRDeleteMonitor were called.
@ -528,27 +527,6 @@ RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor)
continue;
}
/* For each output in 'info.outputs', each one is removed from all
* pre-existing Monitors. If removing the output causes the list
* of outputs for that Monitor to become empty, then that
* Monitor will be deleted as if RRDeleteMonitor were called.
*/
for (eo = 0; eo < existing->numOutputs; eo++) {
for (o = 0; o < monitor->numOutputs; o++) {
if (monitor->outputs[o] == existing->outputs[eo]) {
memmove(existing->outputs + eo, existing->outputs + eo + 1,
(existing->numOutputs - (eo + 1)) * sizeof (RROutput));
--existing->numOutputs;
--eo;
break;
}
}
if (existing->numOutputs == 0) {
(void) RRMonitorDelete(client, screen, existing->name);
break;
}
}
if (monitor->primary)
existing->primary = FALSE;
}