aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
authorokan2009-05-01 17:50:20 +0000
committerokan2009-05-01 17:50:20 +0000
commit4dcd7de222d427ca502887426f73581655e47d19 (patch)
tree767cf7cc4e586a1bcaddab0f033a10ed68b04efa /xevents.c
parenta291ccfe373f681d2b7d59f9734092e776942378 (diff)
downloadcwm-4dcd7de222d427ca502887426f73581655e47d19.tar.gz
fix the other 50% of xrandr cases; reported by sthen@
"commit that" oga@, ok sthen@
Diffstat (limited to 'xevents.c')
-rw-r--r--xevents.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/xevents.c b/xevents.c
index e03dda8..f14ac2c 100644
--- a/xevents.c
+++ b/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: xevents.c,v 1.39 2009/03/28 16:38:54 martynas Exp $
+ * $Id: xevents.c,v 1.40 2009/05/01 17:50:20 okan Exp $
*/
/*
@@ -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);
+ }
}
}