diff --git a/trailfocus.c b/trailfocus.c index ff780ea..3b5068e 100644 --- a/trailfocus.c +++ b/trailfocus.c @@ -106,7 +106,12 @@ setWindows (CompScreen *s) wasTfWindow = tw->isTfWindow; tw->isTfWindow = TRUE; - if (w->invisible || w->hidden || w->minimized) + if (w->attrib.x < 0 || (w->attrib.x + w->attrib.width) > s->width || + w->attrib.y < 0 || (w->attrib.y + w->attrib.height) > s->height) + { + tw->isTfWindow = FALSE; + } + else if (w->invisible || w->hidden || w->minimized || w->shaded) tw->isTfWindow = FALSE; else if (!matchEval (trailfocusGetWindowMatch (s), w)) tw->isTfWindow = FALSE; @@ -294,6 +299,18 @@ trailfocusHandleEvent (CompDisplay *d, if (s) setWindows (s); break; + case PropertyNotify: + if (event->xproperty.atom == d->desktopViewportAtom) + { + s = findScreenAtDisplay (d, event->xproperty.window); + if (s) + { + cleanList (s); + pushWindow (d, d->activeWindow); + setWindows (s); + } + } + break; default: break; }