diff options
author | marha <marha@users.sourceforge.net> | 2013-11-04 12:11:17 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-11-04 12:11:17 +0100 |
commit | d79b6645eb21ca82d506ef038b8ea71a1e431f3f (patch) | |
tree | 8f96f2c0492c134147a32e124ea5d0a7337b2242 /xorg-server/randr/randr.c | |
parent | feb35c5e0724010fc4431e4e4fb24720fcdffe80 (diff) | |
parent | e4ef724e06621be9325fc41ed886fd404467fdc0 (diff) | |
download | vcxsrv-d79b6645eb21ca82d506ef038b8ea71a1e431f3f.tar.gz vcxsrv-d79b6645eb21ca82d506ef038b8ea71a1e431f3f.tar.bz2 vcxsrv-d79b6645eb21ca82d506ef038b8ea71a1e431f3f.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig glproto libX11 mesa xserver xkeyboard-config git update 31 oct 2013
Conflicts:
xorg-server/glx/dispatch.h
xorg-server/glx/glapi.c
xorg-server/glx/glapi.h
xorg-server/glx/glapi_gentable.c
xorg-server/glx/glapitable.h
xorg-server/glx/glprocs.h
xorg-server/glx/glxcmdsswap.c
xorg-server/glx/glxdri.c
xorg-server/glx/glxext.c
xorg-server/glx/glxext.h
xorg-server/glx/indirect_dispatch.c
xorg-server/glx/indirect_dispatch.h
xorg-server/glx/indirect_dispatch_swap.c
xorg-server/glx/indirect_reqsize.c
xorg-server/glx/indirect_reqsize.h
xorg-server/glx/indirect_size.h
xorg-server/glx/indirect_size_get.c
xorg-server/glx/indirect_size_get.h
xorg-server/glx/indirect_table.c
xorg-server/glx/indirect_texture_compression.c
xorg-server/glx/render2.c
xorg-server/glx/render2swap.c
Diffstat (limited to 'xorg-server/randr/randr.c')
-rw-r--r-- | xorg-server/randr/randr.c | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/xorg-server/randr/randr.c b/xorg-server/randr/randr.c index cb6fce7cd..87729e430 100644 --- a/xorg-server/randr/randr.c +++ b/xorg-server/randr/randr.c @@ -420,12 +420,41 @@ RRExtensionInit(void) #endif } +void +RRResourcesChanged(ScreenPtr pScreen) +{ + rrScrPriv(pScreen); + pScrPriv->resourcesChanged = TRUE; + + RRSetChanged(pScreen); +} + +static void +RRDeliverResourceEvent(ClientPtr client, WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + xRRResourceChangeNotifyEvent re; + + rrScrPriv(pScreen); + + + re.type = RRNotify + RREventBase; + re.subCode = RRNotify_ResourceChange; + re.timestamp = pScrPriv->lastSetTime.milliseconds; + re.window = pWin->drawable.id; + + + WriteEventsToClient(client, 1, (xEvent *) &re); +} + static int TellChanged(WindowPtr pWin, pointer value) { RREventPtr *pHead, pRREvent; ClientPtr client; ScreenPtr pScreen = pWin->drawable.pScreen; + ScreenPtr iter; + rrScrPrivPtr pSlaveScrPriv; rrScrPriv(pScreen); int i; @@ -450,6 +479,16 @@ TellChanged(WindowPtr pWin, pointer value) if (crtc->changed) RRDeliverCrtcEvent(client, pWin, crtc); } + + xorg_list_for_each_entry(iter, &pScreen->output_slave_list, output_head) { + pSlaveScrPriv = rrGetScrPriv(iter); + for (i = 0; i < pSlaveScrPriv->numCrtcs; i++) { + RRCrtcPtr crtc = pSlaveScrPriv->crtcs[i]; + + if (crtc->changed) + RRDeliverCrtcEvent(client, pWin, crtc); + } + } } if (pRREvent->mask & RROutputChangeNotifyMask) { @@ -459,6 +498,40 @@ TellChanged(WindowPtr pWin, pointer value) if (output->changed) RRDeliverOutputEvent(client, pWin, output); } + + xorg_list_for_each_entry(iter, &pScreen->output_slave_list, output_head) { + pSlaveScrPriv = rrGetScrPriv(iter); + for (i = 0; i < pSlaveScrPriv->numOutputs; i++) { + RROutputPtr output = pSlaveScrPriv->outputs[i]; + + if (output->changed) + RRDeliverOutputEvent(client, pWin, output); + } + } + } + + if (pRREvent->mask & RRProviderChangeNotifyMask) { + xorg_list_for_each_entry(iter, &pScreen->output_slave_list, output_head) { + pSlaveScrPriv = rrGetScrPriv(iter); + if (pSlaveScrPriv->provider->changed) + RRDeliverProviderEvent(client, pWin, pSlaveScrPriv->provider); + } + xorg_list_for_each_entry(iter, &pScreen->offload_slave_list, offload_head) { + pSlaveScrPriv = rrGetScrPriv(iter); + if (pSlaveScrPriv->provider->changed) + RRDeliverProviderEvent(client, pWin, pSlaveScrPriv->provider); + } + xorg_list_for_each_entry(iter, &pScreen->unattached_list, unattached_head) { + pSlaveScrPriv = rrGetScrPriv(iter); + if (pSlaveScrPriv->provider->changed) + RRDeliverProviderEvent(client, pWin, pSlaveScrPriv->provider); + } + } + + if (pRREvent->mask & RRResourceChangeNotifyMask) { + if (pScrPriv->resourcesChanged) { + RRDeliverResourceEvent(client, pWin); + } } } return WT_WALKCHILDREN; @@ -496,6 +569,8 @@ RRTellChanged(ScreenPtr pScreen) rrScrPriv(pScreen); rrScrPrivPtr mastersp; int i; + ScreenPtr iter; + rrScrPrivPtr pSlaveScrPriv; if (pScreen->isGPU) { master = pScreen->current_master; @@ -514,11 +589,33 @@ RRTellChanged(ScreenPtr pScreen) } pScrPriv->changed = FALSE; mastersp->changed = FALSE; + WalkTree(master, TellChanged, (pointer) master); + + mastersp->resourcesChanged = FALSE; + for (i = 0; i < pScrPriv->numOutputs; i++) pScrPriv->outputs[i]->changed = FALSE; for (i = 0; i < pScrPriv->numCrtcs; i++) pScrPriv->crtcs[i]->changed = FALSE; + + xorg_list_for_each_entry(iter, &master->output_slave_list, output_head) { + pSlaveScrPriv = rrGetScrPriv(iter); + pSlaveScrPriv->provider->changed = FALSE; + for (i = 0; i < pSlaveScrPriv->numOutputs; i++) + pSlaveScrPriv->outputs[i]->changed = FALSE; + for (i = 0; i < pSlaveScrPriv->numCrtcs; i++) + pSlaveScrPriv->crtcs[i]->changed = FALSE; + } + xorg_list_for_each_entry(iter, &master->offload_slave_list, offload_head) { + pSlaveScrPriv = rrGetScrPriv(iter); + pSlaveScrPriv->provider->changed = FALSE; + } + xorg_list_for_each_entry(iter, &master->unattached_list, unattached_head) { + pSlaveScrPriv = rrGetScrPriv(iter); + pSlaveScrPriv->provider->changed = FALSE; + } + if (mastersp->layoutChanged) { pScrPriv->layoutChanged = FALSE; RRPointerScreenConfigured(master); |