summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthb <thb@openoffice.org>2008-06-23 13:25:12 -0400
committerAdam Jackson <ajax@redhat.com>2008-06-23 13:25:12 -0400
commit203fc002b6948c3942f0461a0346dd07b633222d (patch)
tree5600e56da1e0a585693e1ebeeeb4d47501550192
parent332eee90c4d00be3b11049e0261323abe89a96dc (diff)
downloadxorg-lib-libXrandr-203fc002b6948c3942f0461a0346dd07b633222d.tar.gz
Bug #16430: Ignore ConfigureNotify on non-root windows in UpdateConfiguration
-rw-r--r--src/Xrandr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Xrandr.c b/src/Xrandr.c
index 8896675..c7bbc8e 100644
--- a/src/Xrandr.c
+++ b/src/Xrandr.c
@@ -395,9 +395,11 @@ int XRRUpdateConfiguration(XEvent *event)
if (event->type == ConfigureNotify) {
rcevent = (XConfigureEvent *) event;
snum = XRRRootToScreen(dpy, rcevent->window);
- dpy->screens[snum].width = rcevent->width;
- dpy->screens[snum].height = rcevent->height;
- return 1;
+ if (snum != -1) {
+ dpy->screens[snum].width = rcevent->width;
+ dpy->screens[snum].height = rcevent->height;
+ return 1;
+ }
}
info = XRRFindDisplay(dpy);