LOGIN / SIGN UP

#254 Make "smart" placing smarter: Skip maximized windows.

Reported by: wallex Assigned to: ioerror
Phase: release-0.1.13 Component: windowmanager
Type: enhancement Status: closed
Priority: 4: Low
Watchers:

Description

Just something I've been thinking of lately. Wouldn't it be smarter to have "smart" windows placing skip maximized and fullscreen windows? That way opening small windows while you have a maximized application on the background will not break the placing (which would lead to all the new windows being opened piled up on top of each another).

Just add this in Workspaces::isEmptySpace (Workspaces.cc:~870):

        // Skip ourselves, non-mapped and desktop objects. Iconified means
        // skip placement.
        if (wo == (*it) || ! (*it)->isMapped() || (*it)->isIconified()
            || ((*it)->getLayer() == LAYER_DESKTOP)) {
            continue;
        }
        // Also skip windows tagged as Maximized as they cause us to automatically fail.
        if ((*it)->getType() == PWinObj::WO_FRAME) {
            Client * cl = static_cast<Client*>(static_cast<Frame*>((*it))->getActiveChild());
            if (cl && cl->isMaximizedVert() && cl->isMaximizedHorz())
                continue;
            if (cl && cl->isFullscreen())
                continue;
        }
        // Check if we are "intruding" on some other window's place

2010-07-12

21:06:09

Close from commit: 347976c238f0964f8c976201fdf20ab00d978a2a by Claes Nästén

21:06:09 changed from new to closed