forked from pool/xorg-x11-server
Accepting request 204958 from X11:XOrg
- Update to prerelease 1.14.4-rc1 (1.14.3.901) * bugfixes * fixes for security issue CVE-2013-4396 - obsoletes u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch - Add U_randr_dont_directly_set_changed_bits_in_randr_screen.patch, U_randr_report_changes_when_we_disconnect_a_GPU_slave.patch, u_randr_send_rrproviderchangenotify_event.patch, u_randr_send_rrresourcechangenotify_event.patch, u_randr_deliver_output_and_crtc_events_of_attached_output.patch, u_randr_allow_rrselectinput_for_providerchange_and_resourcechange_events.patch * Send randr 1.4 events to allow tools to react to new providers. (fate#316408, fate#316409) OBS-URL: https://build.opensuse.org/request/show/204958 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=270
This commit is contained in:
commit
24c32de2e0
99
U_randr_dont_directly_set_changed_bits_in_randr_screen.patch
Normal file
99
U_randr_dont_directly_set_changed_bits_in_randr_screen.patch
Normal file
@ -0,0 +1,99 @@
|
||||
From f9c8248b8326ad01f33f31531c6b2479baf80f02 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Airlie <airlied@redhat.com>
|
||||
Date: Wed, 9 Jan 2013 14:23:57 +1000
|
||||
Subject: [PATCH] randr: don't directly set changed bits in randr screen
|
||||
|
||||
Introduce a wrapper interface so we can fix things up for multi-gpu
|
||||
situations later.
|
||||
|
||||
This just introduces the API for now.
|
||||
|
||||
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
|
||||
diff --git a/randr/randr.c b/randr/randr.c
|
||||
index f0decfc..11f88b2 100644
|
||||
--- a/randr/randr.c
|
||||
+++ b/randr/randr.c
|
||||
@@ -464,6 +464,14 @@ TellChanged(WindowPtr pWin, pointer value)
|
||||
return WT_WALKCHILDREN;
|
||||
}
|
||||
|
||||
+void
|
||||
+RRSetChanged(ScreenPtr pScreen)
|
||||
+{
|
||||
+ rrScrPriv(pScreen);
|
||||
+
|
||||
+ pScrPriv->changed = TRUE;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Something changed; send events and adjust pointer position
|
||||
*/
|
||||
diff --git a/randr/randrstr.h b/randr/randrstr.h
|
||||
index 2517479..2babfed 100644
|
||||
--- a/randr/randrstr.h
|
||||
+++ b/randr/randrstr.h
|
||||
@@ -486,6 +486,10 @@ extern _X_EXPORT void
|
||||
RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
|
||||
|
||||
/* randr.c */
|
||||
+/* set a screen change on the primary screen */
|
||||
+extern _X_EXPORT void
|
||||
+RRSetChanged(ScreenPtr pScreen);
|
||||
+
|
||||
/*
|
||||
* Send all pending events
|
||||
*/
|
||||
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
|
||||
index 721b05a..2f76b62 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
|
||||
*/
|
||||
diff --git a/randr/rrinfo.c b/randr/rrinfo.c
|
||||
index 1408d6f..fc57bd4 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 88781ba..922d61f 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;
|
||||
}
|
||||
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
|
||||
index 39340cc..36179ae 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);
|
54
U_randr_report_changes_when_we_disconnect_a_GPU_slave.patch
Normal file
54
U_randr_report_changes_when_we_disconnect_a_GPU_slave.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 9d26e8eaf5a2d7c3e65670ac20254c60f665c463 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Airlie <airlied@redhat.com>
|
||||
Date: Wed, 9 Jan 2013 14:26:35 +1000
|
||||
Subject: [PATCH] randr: report changes when we disconnect a GPU slave
|
||||
|
||||
When we disconnect an output/offload slave set the changed bits,
|
||||
so a later TellChanged can do something.
|
||||
|
||||
Then when we remove a GPU slave device, sent change notification
|
||||
to the protocol screen.
|
||||
|
||||
This allows hot unplugged USB devices to disappear in clients.
|
||||
|
||||
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
||||
index 9034dad..bcb65ff 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;
|
||||
@@ -499,7 +500,7 @@ xf86platformRemoveDevice(int index)
|
||||
xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
|
||||
|
||||
xf86_remove_platform_device(index);
|
||||
-
|
||||
+ RRTellChanged(xf86Screens[0]->pScreen);
|
||||
out:
|
||||
return;
|
||||
}
|
||||
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
|
||||
index 25beee6..2817aaa 100644
|
||||
--- a/hw/xfree86/modes/xf86RandR12.c
|
||||
+++ b/hw/xfree86/modes/xf86RandR12.c
|
||||
@@ -1896,10 +1896,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);
|
||||
config->randr_provider->output_source = NULL;
|
||||
+ RRSetChanged(screen);
|
||||
}
|
||||
else if (screen->current_master)
|
||||
DetachUnboundGPU(screen);
|
@ -1,75 +0,0 @@
|
||||
From a4d9bf1259ad28f54b6d59a480b2009cc89ca623 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Mon, 16 Sep 2013 21:47:16 -0700
|
||||
Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText()
|
||||
|
||||
Save a pointer to the passed in closure structure before copying it
|
||||
and overwriting the *c pointer to point to our copy instead of the
|
||||
original. If we hit an error, once we free(c), reset c to point to
|
||||
the original structure before jumping to the cleanup code that
|
||||
references *c.
|
||||
|
||||
Since one of the errors being checked for is whether the server was
|
||||
able to malloc(c->nChars * itemSize), the client can potentially pass
|
||||
a number of characters chosen to cause the malloc to fail and the
|
||||
error path to be taken, resulting in the read from freed memory.
|
||||
|
||||
Since the memory is accessed almost immediately afterwards, and the
|
||||
X server is mostly single threaded, the odds of the free memory having
|
||||
invalid contents are low with most malloc implementations when not using
|
||||
memory debugging features, but some allocators will definitely overwrite
|
||||
the memory there, leading to a likely crash.
|
||||
|
||||
Reported-by: Pedro Ribeiro <pedrib@gmail.com>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
||||
---
|
||||
dix/dixfonts.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
|
||||
index feb765d..2e34d37 100644
|
||||
--- a/dix/dixfonts.c
|
||||
+++ b/dix/dixfonts.c
|
||||
@@ -1425,6 +1425,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
|
||||
GC *pGC;
|
||||
unsigned char *data;
|
||||
ITclosurePtr new_closure;
|
||||
+ ITclosurePtr old_closure;
|
||||
|
||||
/* We're putting the client to sleep. We need to
|
||||
save some state. Similar problem to that handled
|
||||
@@ -1436,12 +1437,14 @@ doImageText(ClientPtr client, ITclosurePtr c)
|
||||
err = BadAlloc;
|
||||
goto bail;
|
||||
}
|
||||
+ old_closure = c;
|
||||
*new_closure = *c;
|
||||
c = new_closure;
|
||||
|
||||
data = malloc(c->nChars * itemSize);
|
||||
if (!data) {
|
||||
free(c);
|
||||
+ c = old_closure;
|
||||
err = BadAlloc;
|
||||
goto bail;
|
||||
}
|
||||
@@ -1452,6 +1455,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
|
||||
if (!pGC) {
|
||||
free(c->data);
|
||||
free(c);
|
||||
+ c = old_closure;
|
||||
err = BadAlloc;
|
||||
goto bail;
|
||||
}
|
||||
@@ -1464,6 +1468,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
|
||||
FreeScratchGC(pGC);
|
||||
free(c->data);
|
||||
free(c);
|
||||
+ c = old_closure;
|
||||
err = BadAlloc;
|
||||
goto bail;
|
||||
}
|
||||
--
|
||||
1.7.9.2
|
||||
|
@ -0,0 +1,24 @@
|
||||
From 6d0da2a4d5c31d055674f482d3d1afe308ed8eeb Mon Sep 17 00:00:00 2001
|
||||
From: Michal Srb <msrb@suse.com>
|
||||
Date: Mon, 7 Oct 2013 17:55:30 +0300
|
||||
Subject: [PATCH] randr: Allow RRSelectInput for ProviderChange and
|
||||
ResourceChange events.
|
||||
|
||||
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
||||
Signed-off-by: Michal Srb <msrb@suse.com>
|
||||
|
||||
diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
|
||||
index 7fbc9f0..f050d38 100644
|
||||
--- a/randr/rrdispatch.c
|
||||
+++ b/randr/rrdispatch.c
|
||||
@@ -92,7 +92,9 @@ ProcRRSelectInput(ClientPtr client)
|
||||
RRCrtcChangeNotifyMask |
|
||||
RROutputChangeNotifyMask |
|
||||
RROutputPropertyNotifyMask |
|
||||
- RRProviderPropertyNotifyMask)) {
|
||||
+ RRProviderChangeNotifyMask |
|
||||
+ RRProviderPropertyNotifyMask |
|
||||
+ RRResourceChangeNotifyMask)) {
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
|
||||
rrScrPriv(pScreen);
|
@ -0,0 +1,61 @@
|
||||
From 0ad777cecd414d4c4b3326cc25580833535b0c0b Mon Sep 17 00:00:00 2001
|
||||
From: Michal Srb <msrb@suse.com>
|
||||
Date: Fri, 4 Oct 2013 17:46:50 +0300
|
||||
Subject: [PATCH] randr: deliver Output and Crtc events of attached output
|
||||
providers.
|
||||
|
||||
Consider all attached output providers when looking for changed outputs and
|
||||
crtcs.
|
||||
|
||||
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
||||
Signed-off-by: Michal Srb <msrb@suse.com>
|
||||
|
||||
diff --git a/randr/randr.c b/randr/randr.c
|
||||
index 9cec6f6..3c51427 100755
|
||||
--- a/randr/randr.c
|
||||
+++ b/randr/randr.c
|
||||
@@ -478,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) {
|
||||
@@ -487,6 +497,16 @@ 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) {
|
||||
@@ -581,6 +601,10 @@ RRTellChanged(ScreenPtr pScreen)
|
||||
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);
|
161
u_randr_send_rrproviderchangenotify_event.patch
Normal file
161
u_randr_send_rrproviderchangenotify_event.patch
Normal file
@ -0,0 +1,161 @@
|
||||
From 6ec75c2f85c14c805f4433a17a56774594d8641c Mon Sep 17 00:00:00 2001
|
||||
From: Michal Srb <msrb@suse.com>
|
||||
Date: Fri, 4 Oct 2013 15:59:34 +0300
|
||||
Subject: [PATCH] randr: send RRProviderChangeNotify event
|
||||
|
||||
Send RRProviderChangeNotify event when a provider becomes output source or
|
||||
offload sink.
|
||||
|
||||
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
||||
Signed-off-by: Michal Srb <msrb@suse.com>
|
||||
|
||||
diff --git a/randr/randr.c b/randr/randr.c
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index cb6fce7..fa0a4da
|
||||
--- a/randr/randr.c
|
||||
+++ b/randr/randr.c
|
||||
@@ -426,6 +426,8 @@ TellChanged(WindowPtr pWin, pointer value)
|
||||
RREventPtr *pHead, pRREvent;
|
||||
ClientPtr client;
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
+ ScreenPtr iter;
|
||||
+ rrScrPrivPtr pSlaveScrPriv;
|
||||
|
||||
rrScrPriv(pScreen);
|
||||
int i;
|
||||
@@ -460,6 +462,24 @@ TellChanged(WindowPtr pWin, pointer value)
|
||||
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);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
return WT_WALKCHILDREN;
|
||||
}
|
||||
@@ -496,6 +516,8 @@ RRTellChanged(ScreenPtr pScreen)
|
||||
rrScrPriv(pScreen);
|
||||
rrScrPrivPtr mastersp;
|
||||
int i;
|
||||
+ ScreenPtr iter;
|
||||
+ rrScrPrivPtr pSlaveScrPriv;
|
||||
|
||||
if (pScreen->isGPU) {
|
||||
master = pScreen->current_master;
|
||||
@@ -519,6 +541,20 @@ RRTellChanged(ScreenPtr pScreen)
|
||||
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;
|
||||
+ }
|
||||
+ 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
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index 2babfed..c933349
|
||||
--- a/randr/randrstr.h
|
||||
+++ b/randr/randrstr.h
|
||||
@@ -164,6 +164,7 @@ struct _rrProvider {
|
||||
int nameLength;
|
||||
RRPropertyPtr properties;
|
||||
Bool pendingProperties;
|
||||
+ Bool changed;
|
||||
struct _rrProvider *offload_sink;
|
||||
struct _rrProvider *output_source;
|
||||
};
|
||||
@@ -923,6 +924,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/rrprovider.c b/randr/rrprovider.c
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index b321e62..2334ad2
|
||||
--- 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);
|
||||
+}
|
170
u_randr_send_rrresourcechangenotify_event.patch
Normal file
170
u_randr_send_rrresourcechangenotify_event.patch
Normal file
@ -0,0 +1,170 @@
|
||||
From 7fa3e6ac35602ba7025e9283e9b2a7ab21ab77fb Mon Sep 17 00:00:00 2001
|
||||
From: Michal Srb <msrb@suse.com>
|
||||
Date: Fri, 4 Oct 2013 16:11:18 +0300
|
||||
Subject: [PATCH] randr: send RRResourceChangeNotify event
|
||||
|
||||
Send RRResourceChangeNotify event when provider, output or crtc was created or
|
||||
destroyed. I.e. when the list of resources returned by RRGetScreenResources and
|
||||
RRGetProviders changes.
|
||||
|
||||
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
||||
Signed-off-by: Michal Srb <msrb@suse.com>
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index e368dee..33b2b7d
|
||||
--- a/hw/xfree86/common/xf86platformBus.c
|
||||
+++ b/hw/xfree86/common/xf86platformBus.c
|
||||
@@ -466,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 +511,8 @@ xf86platformRemoveDevice(int index)
|
||||
xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
|
||||
|
||||
xf86_remove_platform_device(index);
|
||||
+
|
||||
+ RRResourcesChanged(xf86Screens[0]->pScreen);
|
||||
RRTellChanged(xf86Screens[0]->pScreen);
|
||||
out:
|
||||
return;
|
||||
diff --git a/randr/randr.c b/randr/randr.c
|
||||
index fa0a4da..9cec6f6 100755
|
||||
--- a/randr/randr.c
|
||||
+++ b/randr/randr.c
|
||||
@@ -420,6 +420,32 @@ 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)
|
||||
{
|
||||
@@ -480,6 +506,12 @@ TellChanged(WindowPtr pWin, pointer value)
|
||||
RRDeliverProviderEvent(client, pWin, pSlaveScrPriv->provider);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (pRREvent->mask & RRResourceChangeNotifyMask) {
|
||||
+ if (pScrPriv->resourcesChanged) {
|
||||
+ RRDeliverResourceEvent(client, pWin);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
return WT_WALKCHILDREN;
|
||||
}
|
||||
@@ -536,7 +568,11 @@ 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++)
|
||||
diff --git a/randr/randrstr.h b/randr/randrstr.h
|
||||
index c933349..15299fd 100755
|
||||
--- a/randr/randrstr.h
|
||||
+++ b/randr/randrstr.h
|
||||
@@ -301,6 +301,7 @@ typedef struct _rrScrPriv {
|
||||
Bool changed; /* some config changed */
|
||||
Bool configChanged; /* configuration changed */
|
||||
Bool layoutChanged; /* screen layout changed */
|
||||
+ Bool resourcesChanged; /* screen resources change */
|
||||
|
||||
CARD16 minWidth, minHeight;
|
||||
CARD16 maxWidth, maxHeight;
|
||||
@@ -486,6 +487,9 @@ 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
|
||||
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index 2f76b62..99b3dca
|
||||
--- a/randr/rrcrtc.c
|
||||
+++ b/randr/rrcrtc.c
|
||||
@@ -102,6 +102,8 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate)
|
||||
crtc->pScreen = pScreen;
|
||||
pScrPriv->crtcs[pScrPriv->numCrtcs++] = crtc;
|
||||
|
||||
+ RRResourcesChanged(pScreen);
|
||||
+
|
||||
return crtc;
|
||||
}
|
||||
|
||||
@@ -669,6 +671,8 @@ RRCrtcDestroyResource(pointer value, XID pid)
|
||||
break;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ RRResourcesChanged(pScreen);
|
||||
}
|
||||
|
||||
if (crtc->scanout_pixmap)
|
||||
diff --git a/randr/rroutput.c b/randr/rroutput.c
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index 922d61f..2b0b82f
|
||||
--- a/randr/rroutput.c
|
||||
+++ b/randr/rroutput.c
|
||||
@@ -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++)
|
3
xorg-server-1.14.3.901.tar.bz2
Normal file
3
xorg-server-1.14.3.901.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3d8481f60d6ef67bb9b72c1ee375f5a64e69ba32c613c01367b3c2b5c154ab0a
|
||||
size 5510351
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:02125ae13a443dcbb55f964d5c37f1da2f58ad54c2102356037bec23c1b84f5e
|
||||
size 5502845
|
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 28 08:00:16 UTC 2013 - sndirsch@suse.com
|
||||
|
||||
- Update to prerelease 1.14.4-rc1 (1.14.3.901)
|
||||
* bugfixes
|
||||
* fixes for security issue CVE-2013-4396
|
||||
- obsoletes u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 25 12:31:46 UTC 2013 - msrb@suse.com
|
||||
|
||||
- Add U_randr_dont_directly_set_changed_bits_in_randr_screen.patch,
|
||||
U_randr_report_changes_when_we_disconnect_a_GPU_slave.patch,
|
||||
u_randr_send_rrproviderchangenotify_event.patch,
|
||||
u_randr_send_rrresourcechangenotify_event.patch,
|
||||
u_randr_deliver_output_and_crtc_events_of_attached_output.patch,
|
||||
u_randr_allow_rrselectinput_for_providerchange_and_resourcechange_events.patch
|
||||
* Send randr 1.4 events to allow tools to react to new providers. (fate#316408, fate#316409)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 15 13:07:50 UTC 2013 - sndirsch@suse.com
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
Name: xorg-x11-server
|
||||
|
||||
%define dirsuffix 1.14.3
|
||||
%define dirsuffix 1.14.3.901
|
||||
|
||||
Summary: X
|
||||
License: GPL-2.0+ and MIT
|
||||
@ -156,7 +156,13 @@ Patch229: u_disable-acpi-code.patch
|
||||
Patch230: u_xserver_xvfb-randr.patch
|
||||
|
||||
Patch240: U_revert_dri2_realloc_dri2_drawable_if-pixmap_serial_changes.patch
|
||||
Patch241: u_Avoid-use-after-free-in-dix-dixfonts.c-doImageText.patch
|
||||
|
||||
Patch242: U_randr_dont_directly_set_changed_bits_in_randr_screen.patch
|
||||
Patch243: U_randr_report_changes_when_we_disconnect_a_GPU_slave.patch
|
||||
Patch244: u_randr_send_rrproviderchangenotify_event.patch
|
||||
Patch245: u_randr_send_rrresourcechangenotify_event.patch
|
||||
Patch246: u_randr_deliver_output_and_crtc_events_of_attached_output.patch
|
||||
Patch247: u_randr_allow_rrselectinput_for_providerchange_and_resourcechange_events.patch
|
||||
|
||||
%description
|
||||
This package contains the X.Org Server.
|
||||
@ -242,7 +248,13 @@ cp %{SOURCE96} .
|
||||
%patch230 -p1
|
||||
|
||||
%patch240 -p1
|
||||
%patch241 -p1
|
||||
|
||||
%patch242 -p1
|
||||
%patch243 -p1
|
||||
%patch244 -p1
|
||||
%patch245 -p1
|
||||
%patch246 -p1
|
||||
%patch247 -p1
|
||||
|
||||
%build
|
||||
autoreconf -fi
|
||||
|
Loading…
Reference in New Issue
Block a user