diff options
author | okan <okan> | 2009-05-01 17:50:20 +0000 |
---|---|---|
committer | okan <okan> | 2009-05-01 17:50:20 +0000 |
commit | 655c33c4898338db7cb3c9099e6eae6ec4e362f3 (patch) | |
tree | 3188c5172ff197c3eadca7486c0cdfae97eec727 | |
parent | cc68490fe12513394e9218740d28ba23ec158cbd (diff) | |
download | cwm-655c33c4898338db7cb3c9099e6eae6ec4e362f3.tar.gz cwm-655c33c4898338db7cb3c9099e6eae6ec4e362f3.tar.xz cwm-655c33c4898338db7cb3c9099e6eae6ec4e362f3.zip |
fix the other 50% of xrandr cases; reported by sthen@
"commit that" oga@, ok sthen@
-rw-r--r-- | xevents.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/xevents.c b/xevents.c index b0822f7..13d6675 100644 --- a/xevents.c +++ b/xevents.c @@ -358,15 +358,17 @@ void xev_handle_randr(struct xevent *xev, XEvent *ee) { XRRScreenChangeNotifyEvent *rev = (XRRScreenChangeNotifyEvent *)ee; - struct client_ctx *cc; struct screen_ctx *sc; - - if ((cc = client_find(rev->window)) != NULL) { - XRRUpdateConfiguration(ee); - sc = CCTOSC(cc); - sc->xmax = rev->width; - sc->ymax = rev->height; - screen_init_xinerama(sc); + int i; + + i = XRRRootToScreen(X_Dpy, rev->root); + TAILQ_FOREACH(sc, &Screenq, entry) { + if (sc->which == (u_int)i) { + XRRUpdateConfiguration(ee); + sc->xmax = rev->width; + sc->ymax = rev->height; + screen_init_xinerama(sc); + } } } |