diff options
Diffstat (limited to 'src/cmd/rio')
-rw-r--r-- | src/cmd/rio/README | 2 | ||||
-rw-r--r-- | src/cmd/rio/event.c | 15 | ||||
-rw-r--r-- | src/cmd/rio/manage.c | 7 |
3 files changed, 23 insertions, 1 deletions
diff --git a/src/cmd/rio/README b/src/cmd/rio/README index 15c9a77d..5ec193b8 100644 --- a/src/cmd/rio/README +++ b/src/cmd/rio/README @@ -16,7 +16,7 @@ Current incompatibilities that would be nice to fix: can put up the usual b3 menu. Axel Belinfante contributed the code to handle border grabbing -for resize. +for resize and various other improvements. The original README is below. diff --git a/src/cmd/rio/event.c b/src/cmd/rio/event.c index ff053776..a14c4acc 100644 --- a/src/cmd/rio/event.c +++ b/src/cmd/rio/event.c @@ -352,6 +352,7 @@ property(XPropertyEvent *e) Atom a; int delete; Client *c; + long msize; /* we don't set curtime as nothing here uses it */ a = e->atom; @@ -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; } } } |