diff options
author | Nikhil Mahale <nmahale@nvidia.com> | 2016-05-26 21:50:16 +0530 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2016-06-17 11:38:13 +0200 |
commit | 15595d29c2c3992f260a3314f26fa691f1e5cec8 (patch) | |
tree | 6dfb429282e3f0dce2d16d039dca5e911628bcd0 /randr | |
parent | 5c7af02b103790ac1fb6a71822788892c70290b6 (diff) |
randr: Adjust master's last set time with slaves
In prime configurations master's last set time may not be latest
and greatest, adjust it with slaves last set time, pick up greatest
one. Otherwise xserver may end with events which has
lastSetTime < lastConfigTime even if that's not
the case and confuse xrandr client.
[hdegoede: rebase on "xrandrprovider: Do not use separate lists for unbound /
source / offload slaves"]
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'randr')
-rw-r--r-- | randr/randr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/randr/randr.c b/randr/randr.c index 95ed7e5e6..0138dc100 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -580,6 +580,18 @@ RRTellChanged(ScreenPtr pScreen) mastersp = pScrPriv; } + xorg_list_for_each_entry(iter, &master->slave_list, slave_head) { + pSlaveScrPriv = rrGetScrPriv(iter); + + if (!iter->is_output_slave) + continue; + + if (CompareTimeStamps(mastersp->lastSetTime, + pSlaveScrPriv->lastSetTime) == EARLIER) { + mastersp->lastSetTime = pSlaveScrPriv->lastSetTime; + } + } + if (mastersp->changed) { UpdateCurrentTimeIf(); if (mastersp->configChanged) { |