From 78802e6993a0f44d7ac7ff7d0922d55d1b089dac Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 24 Apr 2004 04:52:49 +0000 Subject: various bug fixes --- src/cmd/9term/9term.c | 4 ++++ src/cmd/auxstats/Linux.c | 12 +++++++++++- src/cmd/rio/README | 2 +- src/cmd/rio/event.c | 15 +++++++++++++++ src/cmd/rio/manage.c | 7 +++++++ 5 files changed, 38 insertions(+), 2 deletions(-) (limited to 'src/cmd') diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c index df27261d..a77dc32b 100644 --- a/src/cmd/9term/9term.c +++ b/src/cmd/9term/9term.c @@ -544,9 +544,13 @@ mouse(void) domenu2(2); break; case 4: + bouncemouse(&t.m); + break; + /* if(aselect(&q0, &q1, plumbcolor) >= 0) plumb(q0, q1); break; + */ } } diff --git a/src/cmd/auxstats/Linux.c b/src/cmd/auxstats/Linux.c index 06e9d422..d4c2a29c 100644 --- a/src/cmd/auxstats/Linux.c +++ b/src/cmd/auxstats/Linux.c @@ -55,6 +55,7 @@ xmeminfo(int first) { int i; vlong tot, used; + vlong mtot, mfree; static int fd = -1; if(first){ @@ -63,9 +64,10 @@ xmeminfo(int first) } readfile(fd); + mtot = 0; for(i=0; iatom; @@ -378,6 +379,15 @@ property(XPropertyEvent *e) case XA_WM_TRANSIENT_FOR: gettrans(c); return; + case XA_WM_HINTS: + case XA_WM_SIZE_HINTS: + case XA_WM_ZOOM_HINTS: + /* placeholders to not forget. ignore for now. -Axel */ + return; + case XA_WM_NORMAL_HINTS: + if (XGetWMNormalHints(dpy, c->window, &c->size, &msize) == 0 || c->size.flags == 0) + c->size.flags = PSize; /* not specified - punt */ + return; } if (a == _rio_hold_mode) { c->hold = getiprop(c->window, _rio_hold_mode); @@ -404,7 +414,12 @@ reparent(XReparentEvent *e) if ((s = getscreen(e->parent)) != 0) { c = getclient(e->window, 1); if (c != 0 && (c->dx == 0 || c->dy == 0)) { + /* flush any errors */ + ignore_badwindow = 1; XGetWindowAttributes(dpy, c->window, &attr); + XSync(dpy, False); + ignore_badwindow = 0; + c->x = attr.x; c->y = attr.y; c->dx = attr.width; diff --git a/src/cmd/rio/manage.c b/src/cmd/rio/manage.c index 2c8f71c7..11892a06 100644 --- a/src/cmd/rio/manage.c +++ b/src/cmd/rio/manage.c @@ -359,8 +359,11 @@ getcmaps(Client *c) XWindowAttributes attr; if (!c->init) { + ignore_badwindow = 1; XGetWindowAttributes(dpy, c->window, &attr); c->cmap = attr.colormap; + XSync(dpy, False); + ignore_badwindow = 0; } n = _getprop(c->window, wm_colormaps, XA_WINDOW, 100L, (void*)&cw); @@ -381,9 +384,13 @@ getcmaps(Client *c) if (cw[i] == c->window) c->wmcmaps[i] = c->cmap; else { + /* flush any errors (e.g., caused by mozilla tabs) */ + ignore_badwindow = 1; XSelectInput(dpy, cw[i], ColormapChangeMask); XGetWindowAttributes(dpy, cw[i], &attr); c->wmcmaps[i] = attr.colormap; + XSync(dpy, False); + ignore_badwindow = 0; } } } -- cgit v1.2.3