[PATCH] Fix kwin crashes on xrandr update on NX
Timo Aaltonen
tjaalton at ubuntu.com
Wed Feb 6 07:19:50 PST 2013
https://bugs.freedesktop.org/show_bug.cgi?id=59795
Signed-off-by: Ritesh Khadgaray <khadgaray at gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/Xrandr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/Xrandr.c b/src/Xrandr.c
index b1e97ec..9a56636 100644
--- a/src/Xrandr.c
+++ b/src/Xrandr.c
@@ -483,6 +483,10 @@ int XRRUpdateConfiguration(XEvent *event)
scevent = (XRRScreenChangeNotifyEvent *) event;
snum = XRRRootToScreen(dpy,
((XRRScreenChangeNotifyEvent *) event)->root);
+ /* check for return value, fails on nx */
+ if (snum == -1 ) {
+ return 0;
+ }
if (scevent->rotation & (RR_Rotate_90 | RR_Rotate_270)) {
dpy->screens[snum].width = scevent->height;
dpy->screens[snum].height = scevent->width;
--
1.7.10.4
More information about the xorg-devel
mailing list