static Bool isScaleWin (CompWindow *w) { SCALE_SCREEN (w->screen); if (isNeverScaleWin (w)) return FALSE; if (!ss->type || ss->type == ScaleTypeOutput) { if (!(*w->screen->focusWindow) (w)) return FALSE; } if (w->state & CompWindowStateSkipPagerMask) return FALSE; if (w->state & CompWindowStateShadedMask) return FALSE; if (!w->mapNum || w->attrib.map_state != IsViewable) return FALSE; switch (ss->type) { case ScaleTypeGroup: if (ss->clientLeader != w->clientLeader && ss->clientLeader != w->id) return FALSE; break; case ScaleTypeOutput: if (outputDeviceForWindow(w) != w->screen->currentOutputDev) return FALSE; default: break; } if (!matchEval (ss->currentMatch, w)) return FALSE; return TRUE; }
bool PrivateScaleWindow::isScaleWin () const { if (isNeverScaleWin ()) return false; if (!spScreen->type || spScreen->type == ScaleTypeOutput) { if (!window->focus ()) return false; } if (window->state () & CompWindowStateSkipPagerMask) return false; if (window->state () & CompWindowStateShadedMask) return false; if (!window->mapNum () || !window->isViewable ()) return false; switch (sScreen->priv->type) { case ScaleTypeGroup: if (spScreen->clientLeader != window->clientLeader () && spScreen->clientLeader != window->id ()) return false; break; case ScaleTypeOutput: if ((unsigned int) window->outputDevice () != (unsigned int) screen->currentOutputDev ().id ()) return false; default: break; } if (!spScreen->currentMatch.evaluate (window)) return false; return true; }