summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-12-30 17:08:02 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2013-12-30 17:08:02 +0000
commit8a5af4c0870c64c4efc7a137a950b840fa145ec4 (patch)
tree769e01986b2136ee7acbebc78e509cc1f9e36e7d
parentfc31312248599d13894c6a41d335bd6cb61f9c79 (diff)
parent200f98894a43114586eb2d4405e766e8a4a59221 (diff)
Merge tag 'xorg-server-1.14.5' into cygwin-release-1.14
xorg-server-1.14.5
-rw-r--r--Xext/sync.c11
-rw-r--r--configure.ac6
-rw-r--r--glx/glxdricommon.c24
-rw-r--r--hw/xfree86/common/xf86Bus.c5
-rw-r--r--hw/xfree86/common/xf86platformBus.c6
-rw-r--r--hw/xfree86/modes/xf86RandR12.c21
-rw-r--r--hw/xquartz/X11Controller.m2
-rw-r--r--hw/xquartz/bundle/Info.plist.cpp8
-rw-r--r--miext/damage/damage.c5
-rw-r--r--randr/randr.c120
-rw-r--r--randr/randrstr.h12
-rw-r--r--randr/rrcrtc.c6
-rw-r--r--randr/rrinfo.c2
-rw-r--r--randr/rroutput.c7
-rw-r--r--randr/rrpointer.c2
-rw-r--r--randr/rrprovider.c25
-rw-r--r--randr/rrscreen.c2
17 files changed, 240 insertions, 24 deletions
diff --git a/Xext/sync.c b/Xext/sync.c
index 9b4d0a474..dd6633f71 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -2654,7 +2654,16 @@ IdleTimeBlockHandler(pointer pCounter, struct timeval **wt, pointer LastSelectMa
IdleTimeQueryValue(counter, &idle);
counter->value = idle; /* push, so CheckTrigger works */
- if (less && XSyncValueLessOrEqual(idle, *less)) {
+ /**
+ * There's an indefinite amount of time between ProcessInputEvents()
+ * where the idle time is reset and the time we actually get here. idle
+ * may be past the lower bracket if we dawdled with the events, so
+ * check for whether we did reset and bomb out of select immediately.
+ */
+ if (less && XSyncValueGreaterThan(idle, *less) &&
+ LastEventTimeWasReset(priv->deviceid)) {
+ AdjustWaitForDelay(wt, 0);
+ } else if (less && XSyncValueLessOrEqual(idle, *less)) {
/*
* We've been idle for less than the threshold value, and someone
* wants to know about that, but now we need to know whether they
diff --git a/configure.ac b/configure.ac
index 539b4187c..3a6648160 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,9 +26,9 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.14.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2013-10-31"
-RELEASE_NAME="October Flood"
+AC_INIT([xorg-server], 1.14.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2013-12-12"
+RELEASE_NAME="November Rain"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c
index c90f38098..5686c5f64 100644
--- a/glx/glxdricommon.c
+++ b/glx/glxdricommon.c
@@ -209,6 +209,14 @@ glxConvertConfigs(const __DRIcoreExtension * core,
static const char dri_driver_path[] = DRI_DRIVER_PATH;
+/* Temporary define to allow building without a dri_interface.h from
+ * updated Mesa. Some day when we don't care about Mesa that old any
+ * more this can be removed.
+ */
+#ifndef __DRI_DRIVER_GET_EXTENSIONS
+#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions"
+#endif
+
void *
glxProbeDriver(const char *driverName,
void **coreExt, const char *coreName, int coreVersion,
@@ -217,7 +225,8 @@ glxProbeDriver(const char *driverName,
int i;
void *driver;
char filename[PATH_MAX];
- const __DRIextension **extensions;
+ char *get_extensions_name;
+ const __DRIextension **extensions = NULL;
snprintf(filename, sizeof filename, "%s/%s_dri.so",
dri_driver_path, driverName);
@@ -229,7 +238,18 @@ glxProbeDriver(const char *driverName,
goto cleanup_failure;
}
- extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
+ if (asprintf(&get_extensions_name, "%s_%s",
+ __DRI_DRIVER_GET_EXTENSIONS, driverName) != -1) {
+ const __DRIextension **(*get_extensions)(void);
+
+ get_extensions = dlsym(driver, get_extensions_name);
+ if (get_extensions)
+ extensions = get_extensions();
+ free(get_extensions_name);
+ }
+
+ if (!extensions)
+ extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
if (extensions == NULL) {
LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
driverName, dlerror());
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index e1015379b..d463e9196 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -266,6 +266,11 @@ xf86IsEntityPrimary(int entityIndex)
{
EntityPtr pEnt = xf86Entities[entityIndex];
+#ifdef XSERVER_LIBPCIACCESS
+ if (primaryBus.type == BUS_PLATFORM && pEnt->bus.type == BUS_PCI)
+ return MATCH_PCI_DEVICES(pEnt->bus.id.pci, primaryBus.id.plat->pdev);
+#endif
+
if (primaryBus.type != pEnt->bus.type)
return FALSE;
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index db831a883..33b2b7dd8 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -47,6 +47,7 @@
#include "Pci.h"
#include "xf86platformBus.h"
+#include "randrstr.h"
int platformSlotClaimed;
int xf86_num_platform_devices;
@@ -465,6 +466,9 @@ xf86platformAddDevice(int index)
/* attach unbound to 0 protocol screen */
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+ RRResourcesChanged(xf86Screens[0]->pScreen);
+ RRTellChanged(xf86Screens[0]->pScreen);
+
return 0;
}
@@ -508,6 +512,8 @@ xf86platformRemoveDevice(int index)
xf86_remove_platform_device(index);
+ RRResourcesChanged(xf86Screens[0]->pScreen);
+ RRTellChanged(xf86Screens[0]->pScreen);
out:
return;
}
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 01fc9c5e3..db31432fc 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1770,6 +1770,19 @@ xf86RandR12EnterVT(ScrnInfoPtr pScrn)
return RRGetInfo(pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */
}
+static void
+xf86DetachOutputGPU(ScreenPtr pScreen)
+{
+ rrScrPrivPtr rp = rrGetScrPriv(pScreen);
+ int i;
+
+ /* make sure there are no attached shared scanout pixmaps first */
+ for (i = 0; i < rp->numCrtcs; i++)
+ RRCrtcDetachScanoutPixmap(rp->crtcs[i]);
+
+ DetachOutputGPU(pScreen);
+}
+
static Bool
xf86RandR14ProviderSetOutputSource(ScreenPtr pScreen,
RRProviderPtr provider,
@@ -1779,7 +1792,7 @@ xf86RandR14ProviderSetOutputSource(ScreenPtr pScreen,
if (provider->output_source) {
ScreenPtr cmScreen = pScreen->current_master;
- DetachOutputGPU(pScreen);
+ xf86DetachOutputGPU(pScreen);
AttachUnboundGPU(cmScreen, pScreen);
}
provider->output_source = NULL;
@@ -1807,7 +1820,7 @@ xf86RandR14ProviderSetOffloadSink(ScreenPtr pScreen,
if (!sink_provider) {
if (provider->offload_sink) {
ScreenPtr cmScreen = pScreen->current_master;
- DetachOutputGPU(pScreen);
+ xf86DetachOutputGPU(pScreen);
AttachUnboundGPU(cmScreen, pScreen);
}
@@ -1895,10 +1908,12 @@ xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider)
if (config->randr_provider->offload_sink) {
DetachOffloadGPU(screen);
config->randr_provider->offload_sink = NULL;
+ RRSetChanged(screen);
}
else if (config->randr_provider->output_source) {
- DetachOutputGPU(screen);
+ xf86DetachOutputGPU(screen);
config->randr_provider->output_source = NULL;
+ RRSetChanged(screen);
}
else if (screen->current_master)
DetachUnboundGPU(screen);
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 737db42e7..3d094bfc7 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -936,7 +936,7 @@ extern char *bundle_id_prefix;
- (void) applicationWillTerminate:(NSNotification *)aNotification
{
- unsigned remain;
+ int remain;
[X11App prefs_synchronize];
/* shutdown the X server, it will exit () for us. */
diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index b0106c6da..4b4a894a4 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -19,9 +19,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.7.4</string>
+ <string>2.7.5</string>
<key>CFBundleVersion</key>
- <string>2.7.4</string>
+ <string>2.7.5</string>
<key>CFBundleSignature</key>
<string>x11a</string>
<key>CSResourcesFileMapped</key>
@@ -39,9 +39,9 @@
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>NSHumanReadableCopyright</key>
- <string>© 2003-2012 Apple Inc.
+ <string>© 2003-2013 Apple Inc.
© 2003 XFree86 Project, Inc.
-© 2003-2012 X.org Foundation, Inc.
+© 2003-2013 X.org Foundation, Inc.
</string>
<key>NSMainNibFile</key>
<string>main</string>
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index a98c20ec0..3dc3180f3 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -439,10 +439,7 @@ damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
drawableDamage(pDrawable);
DAMAGE_GC_FUNC_PROLOGUE(pGC);
(*pGC->funcs->ValidateGC) (pGC, changes, pDrawable);
- if (pDamage)
- pGCPriv->ops = pGC->ops; /* so it's not NULL, so FUNC_EPILOGUE does work */
- else
- pGCPriv->ops = NULL;
+ pGCPriv->ops = pGC->ops; /* just so it's not NULL */
DAMAGE_GC_FUNC_EPILOGUE(pGC);
}
diff --git a/randr/randr.c b/randr/randr.c
index f0decfc6c..3c5142771 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -420,12 +420,40 @@ 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;
+
+ rrScrPriv(pScreen);
+
+ xRRResourceChangeNotifyEvent re = {
+ .type = RRNotify + RREventBase,
+ .subCode = RRNotify_ResourceChange,
+ .timestamp = pScrPriv->lastSetTime.milliseconds,
+ .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 +478,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,11 +497,67 @@ 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;
}
+void
+RRSetChanged(ScreenPtr pScreen)
+{
+ /* set changed bits on the master screen only */
+ ScreenPtr master;
+ rrScrPriv(pScreen);
+ rrScrPrivPtr mastersp;
+
+ if (pScreen->isGPU) {
+ master = pScreen->current_master;
+ if (!master)
+ return;
+ mastersp = rrGetScrPriv(master);
+ }
+ else {
+ master = pScreen;
+ mastersp = pScrPriv;
+ }
+
+ mastersp->changed = TRUE;
+}
+
/*
* Something changed; send events and adjust pointer position
*/
@@ -474,6 +568,8 @@ RRTellChanged(ScreenPtr pScreen)
rrScrPriv(pScreen);
rrScrPrivPtr mastersp;
int i;
+ ScreenPtr iter;
+ rrScrPrivPtr pSlaveScrPriv;
if (pScreen->isGPU) {
master = pScreen->current_master;
@@ -484,7 +580,7 @@ RRTellChanged(ScreenPtr pScreen)
mastersp = pScrPriv;
}
- if (pScrPriv->changed) {
+ if (mastersp->changed) {
UpdateCurrentTimeIf();
if (mastersp->configChanged) {
mastersp->lastConfigTime = currentTime;
@@ -492,11 +588,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);
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 25174798f..27b4ba05c 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -166,6 +166,7 @@ struct _rrProvider {
Bool pendingProperties;
struct _rrProvider *offload_sink;
struct _rrProvider *output_source;
+ Bool changed;
};
#if RANDR_12_INTERFACE
@@ -336,6 +337,7 @@ typedef struct _rrScrPriv {
RRProviderDestroyProcPtr rrProviderDestroy;
+ Bool resourcesChanged; /* screen resources change */
} rrScrPrivRec, *rrScrPrivPtr;
extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
@@ -485,7 +487,14 @@ extern _X_EXPORT int
extern _X_EXPORT void
RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
+extern _X_EXPORT void
+ RRResourcesChanged(ScreenPtr pScreen);
+
/* randr.c */
+/* set a screen change on the primary screen */
+extern _X_EXPORT void
+RRSetChanged(ScreenPtr pScreen);
+
/*
* Send all pending events
*/
@@ -919,6 +928,9 @@ RRProviderSetCapabilities(RRProviderPtr provider, uint32_t capabilities);
extern _X_EXPORT Bool
RRProviderLookup(XID id, RRProviderPtr *provider_p);
+extern _X_EXPORT void
+RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
+
/* rrproviderproperty.c */
extern _X_EXPORT void
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 6e2eca5ad..5cdfd0510 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -39,7 +39,7 @@ RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged)
if (pScreen) {
rrScrPriv(pScreen);
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
/*
* Send ConfigureNotify on any layout change
*/
@@ -102,6 +102,8 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate)
crtc->pScreen = pScreen;
pScrPriv->crtcs[pScrPriv->numCrtcs++] = crtc;
+ RRResourcesChanged(pScreen);
+
return crtc;
}
@@ -672,6 +674,8 @@ RRCrtcDestroyResource(pointer value, XID pid)
break;
}
}
+
+ RRResourcesChanged(pScreen);
}
if (crtc->scanout_pixmap)
diff --git a/randr/rrinfo.c b/randr/rrinfo.c
index 1408d6f64..fc57bd408 100644
--- a/randr/rrinfo.c
+++ b/randr/rrinfo.c
@@ -225,7 +225,7 @@ RRScreenSetSizeRange(ScreenPtr pScreen,
pScrPriv->minHeight = minHeight;
pScrPriv->maxWidth = maxWidth;
pScrPriv->maxHeight = maxHeight;
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
pScrPriv->configChanged = TRUE;
}
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 88781ba0f..2b0b82f4c 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -36,7 +36,7 @@ RROutputChanged(RROutputPtr output, Bool configChanged)
output->changed = TRUE;
if (pScreen) {
rrScrPriv(pScreen);
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
if (configChanged)
pScrPriv->configChanged = TRUE;
}
@@ -101,6 +101,9 @@ RROutputCreate(ScreenPtr pScreen,
return NULL;
pScrPriv->outputs[pScrPriv->numOutputs++] = output;
+
+ RRResourcesChanged(pScreen);
+
return output;
}
@@ -355,6 +358,8 @@ RROutputDestroyResource(pointer value, XID pid)
break;
}
}
+
+ RRResourcesChanged(pScreen);
}
if (output->modes) {
for (m = 0; m < output->numModes; m++)
diff --git a/randr/rrpointer.c b/randr/rrpointer.c
index ec803e9d1..eb6b6770c 100644
--- a/randr/rrpointer.c
+++ b/randr/rrpointer.c
@@ -82,7 +82,7 @@ RRPointerToNearestCrtc(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y,
else
dx = 0;
if (y < crtc->y)
- dy = crtc->y - x;
+ dy = crtc->y - y;
else if (y > crtc->y + scan_height)
dy = y - (crtc->y + scan_height);
else
diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index b321e6227..2334ad277 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -304,6 +304,9 @@ ProcRRSetProviderOutputSource(ClientPtr client)
pScrPriv->rrProviderSetOutputSource(pScreen, provider, source_provider);
+ provider->changed = TRUE;
+ RRSetChanged(pScreen);
+
RRTellChanged (pScreen);
return Success;
@@ -333,6 +336,9 @@ ProcRRSetProviderOffloadSink(ClientPtr client)
pScrPriv->rrProviderSetOffloadSink(pScreen, provider, sink_provider);
+ provider->changed = TRUE;
+ RRSetChanged(pScreen);
+
RRTellChanged (pScreen);
return Success;
@@ -357,6 +363,7 @@ RRProviderCreate(ScreenPtr pScreen, const char *name,
provider->nameLength = nameLength;
memcpy(provider->name, name, nameLength);
provider->name[nameLength] = '\0';
+ provider->changed = FALSE;
if (!AddResource (provider->id, RRProviderType, (pointer) provider))
return NULL;
@@ -416,3 +423,21 @@ RRProviderLookup(XID id, RRProviderPtr *provider_p)
return TRUE;
return FALSE;
}
+
+void
+RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+
+ rrScrPriv(pScreen);
+
+ xRRProviderChangeNotifyEvent pe = {
+ .type = RRNotify + RREventBase,
+ .subCode = RRNotify_ProviderChange,
+ .timestamp = pScrPriv->lastSetTime.milliseconds,
+ .window = pWin->drawable.id,
+ .provider = provider->id
+ };
+
+ WriteEventsToClient(client, 1, (xEvent *) &pe);
+}
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 39340ccee..36179ae89 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -143,7 +143,7 @@ RRScreenSizeNotify(ScreenPtr pScreen)
pScrPriv->height = pScreen->height;
pScrPriv->mmWidth = pScreen->mmWidth;
pScrPriv->mmHeight = pScreen->mmHeight;
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
/* pScrPriv->sizeChanged = TRUE; */
RRTellChanged(pScreen);