X-Git-Url: https://git.piment-noir.org/?p=deb_xorg-server.git;a=blobdiff_plain;f=debian%2Fpatches%2Fxrandr-rroutputchanged-main.patch;fp=debian%2Fpatches%2Fxrandr-rroutputchanged-main.patch;h=0d8121e79141c26f02f6af0c3ee85cb44088d349;hp=0000000000000000000000000000000000000000;hb=7217e0ca50bba73dad94782e67980aeeb24ab693;hpb=a09e091a5c996d46a398abb27b06fe504591673f diff --git a/debian/patches/xrandr-rroutputchanged-main.patch b/debian/patches/xrandr-rroutputchanged-main.patch new file mode 100644 index 0000000..0d8121e --- /dev/null +++ b/debian/patches/xrandr-rroutputchanged-main.patch @@ -0,0 +1,63 @@ +From e78c75f5e19cf38f276b1631078f87b502fdc555 Mon Sep 17 00:00:00 2001 +From: Alberto Milone +Date: Sun, 8 Dec 2013 10:00:08 +0100 +Subject: [PATCH 1/1] randr: make RROutputChanged change the main protocol + screen not the gpu screen + +We only set changes on the main protocol screen as, for example +in RRSetChanged() and RRTellChanged(), therefore we should follow +the same logic when reporting that an output changed in +RROutputChanged(). + +This means that RRTellChanged() will then update the relevant +timestamps also when events come from gpu screens. + +Reviewed-by: Dave Airlie +Signed-off-by: Alberto Milone +--- + randr/rroutput.c | 25 ++++++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) + +diff --git a/randr/rroutput.c b/randr/rroutput.c +index 2b0b82f..3cc9852 100644 +--- a/randr/rroutput.c ++++ b/randr/rroutput.c +@@ -31,15 +31,30 @@ RESTYPE RROutputType; + void + RROutputChanged(RROutputPtr output, Bool configChanged) + { ++ /* set changed bits on the master screen only */ + ScreenPtr pScreen = output->pScreen; + + output->changed = TRUE; +- if (pScreen) { +- rrScrPriv(pScreen); +- RRSetChanged(pScreen); +- if (configChanged) +- pScrPriv->configChanged = TRUE; ++ if (!pScreen) ++ return; ++ ++ ScreenPtr master; ++ rrScrPriv(pScreen); ++ rrScrPrivPtr mastersp; ++ ++ if (pScreen->isGPU) { ++ master = pScreen->current_master; ++ if (!master) ++ return; ++ mastersp = rrGetScrPriv(master); + } ++ else { ++ mastersp = pScrPriv; ++ } ++ ++ RRSetChanged(pScreen); ++ if (configChanged) ++ mastersp->configChanged = TRUE; + } + + /* +-- +1.7.9.5 +