Esempio n. 1
0
/** Toggle the selected client to max
 * \param cmd uicb_t type unused
*/
void
uicb_togglemax(uicb_t cmd)
{
     (void)cmd;

     if(!sel || ishide(sel, selscreen)
        || (sel->flags & HintFlag)|| (sel->flags & FSSFlag))
          return;

     if(!(sel->flags & MaxFlag))
     {
          sel->ogeo = sel->geo;
          sel->free_geo = sel->geo;
          sel->flags &= ~(TileFlag | FreeFlag);
          client_maximize(sel);
          XRaiseWindow(dpy, sel->frame);
          sel->flags |= MaxFlag;

     }
     else
     {
          sel->geo = sel->ogeo;
          client_moveresize(sel, sel->geo, True);
          sel->flags &= ~MaxFlag;
          tags[selscreen][seltag[selscreen]].layout.func(selscreen);
     }

     return;
}
Esempio n. 2
0
void PaintedWidget::paintEvent(QPaintEvent *event) {
    QPainter painter(this);
    img.fill(Qt::white);
    double minZ=0;
    for(int i=0;i<8;i++)if(node[i][2]<minZ)minZ=node[i][2];
    for(int i=0;i<6;i++)if(!ishide(minZ,i)) {
        color=colors[i].lighter(int(fact(i)));
        drawSurface(i,&painter);
    }
    painter.drawImage(0,0,img);
}
Esempio n. 3
0
/** Sort all the client that can be
 *  tiled
 * \param c Client pointer
 * \return a client pointer
*/
static Client*
tiled_client(int screen, Client *c)
{
     for(;c && ((c->flags & MaxFlag)
                || (c->flags & FreeFlag)
                || (c->flags & FSSFlag)
                || (c->flags & AboveFlag)
                || c->screen != screen
                || ishide(c, screen)); c = c->next);

     if(c)
          c->flags |= FLayFlag;

     return c;
}
Esempio n. 4
0
/** The free layout function
*/
void
freelayout(int screen)
{
     Client *c;
     (void)screen;

     for(c = clients; c; c = c->next)
          if(!ishide(c, selscreen)
             && c->screen == screen_get_sel()
             && !(c->flags & MaxFlag))
          {
               client_moveresize(c, c->free_geo, True);
               c->flags &= ~(TileFlag | LMaxFlag);
          }

     ewmh_update_current_tag_prop();

     return;
}
Esempio n. 5
0
/** Arrange All
*/
void
arrange(int screen, Bool update_layout)
{
     Client *c;

     if(screen < 0 || screen > screen_count() - 1)
          screen = screen_get_sel();

     for(c = clients; c; c = c->next)
          if(c->screen == screen)
          {
               if(!ishide(c, screen))
                    client_unhide(c);
               else
                    client_hide(c);
          }

     if(update_layout)
          tags[screen][seltag[screen]].layout.func(screen);

     infobar_draw(screen);

     return;
}