mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-20 23:20:36 +01:00
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. [ajax: Fix mixed code and decls] Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
This commit is contained in:
parent
2092f12a24
commit
702c0a247f
1 changed files with 17 additions and 5 deletions
|
|
@ -31,15 +31,27 @@ RESTYPE RROutputType;
|
|||
void
|
||||
RROutputChanged(RROutputPtr output, Bool configChanged)
|
||||
{
|
||||
/* set changed bits on the master screen only */
|
||||
ScreenPtr pScreen = output->pScreen;
|
||||
rrScrPrivPtr mastersp;
|
||||
|
||||
output->changed = TRUE;
|
||||
if (pScreen) {
|
||||
rrScrPriv(pScreen);
|
||||
RRSetChanged(pScreen);
|
||||
if (configChanged)
|
||||
pScrPriv->configChanged = TRUE;
|
||||
if (!pScreen)
|
||||
return;
|
||||
|
||||
if (pScreen->isGPU) {
|
||||
ScreenPtr master = pScreen->current_master;
|
||||
if (!master)
|
||||
return;
|
||||
mastersp = rrGetScrPriv(master);
|
||||
}
|
||||
else {
|
||||
mastersp = rrGetScrPriv(pScreen);
|
||||
}
|
||||
|
||||
RRSetChanged(pScreen);
|
||||
if (configChanged)
|
||||
mastersp->configChanged = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue