Client: Fix arrangement bug: add screen argument to ishide().
This commit is contained in:
parent
b73ba2106e
commit
c58a75539b
18
src/client.c
18
src/client.c
@ -92,16 +92,16 @@ uicb_client_prev(uicb_t cmd)
|
||||
{
|
||||
Client *c = NULL, *d;
|
||||
|
||||
if(!sel || ishide(sel))
|
||||
if(!sel || ishide(sel, selscreen))
|
||||
return;
|
||||
|
||||
for(d = clients; d != sel; d = d->next)
|
||||
if(!ishide(d))
|
||||
if(!ishide(d, selscreen))
|
||||
c = d;
|
||||
|
||||
if(!c)
|
||||
for(; d; d = d->next)
|
||||
if(!ishide(d))
|
||||
if(!ishide(d, selscreen))
|
||||
c = d;
|
||||
if(c)
|
||||
{
|
||||
@ -120,12 +120,12 @@ uicb_client_next(uicb_t cmd)
|
||||
{
|
||||
Client *c = NULL;
|
||||
|
||||
if(!sel || ishide(sel))
|
||||
if(!sel || ishide(sel, selscreen))
|
||||
return;
|
||||
|
||||
for(c = sel->next; c && ishide(c); c = c->next);
|
||||
for(c = sel->next; c && ishide(c, selscreen); c = c->next);
|
||||
if(!c)
|
||||
for(c = clients; c && ishide(c); c = c->next);
|
||||
for(c = clients; c && ishide(c, selscreen); c = c->next);
|
||||
if(c)
|
||||
{
|
||||
client_focus(c);
|
||||
@ -304,12 +304,12 @@ client_hide(Client *c)
|
||||
* \return True if the client is hide; False if not
|
||||
*/
|
||||
Bool
|
||||
ishide(Client *c)
|
||||
ishide(Client *c, int screen)
|
||||
{
|
||||
screen_get_sel();
|
||||
|
||||
if(c->tag && c->tag == seltag[selscreen]
|
||||
&& c->screen == selscreen)
|
||||
if(c->tag == seltag[screen]
|
||||
&& c->screen == screen)
|
||||
return False;
|
||||
return True;
|
||||
}
|
||||
|
||||
10
src/layout.c
10
src/layout.c
@ -42,7 +42,7 @@ arrange(int screen)
|
||||
for(c = clients; c; c = c->next)
|
||||
if(c->screen == screen)
|
||||
{
|
||||
if(!ishide(c))
|
||||
if(!ishide(c, screen))
|
||||
client_unhide(c);
|
||||
else
|
||||
client_hide(c);
|
||||
@ -62,7 +62,7 @@ freelayout(int screen)
|
||||
Client *c;
|
||||
|
||||
for(c = clients; c; c = c->next)
|
||||
if(!ishide(c) && c->screen == screen_get_sel())
|
||||
if(!ishide(c, selscreen) && c->screen == screen_get_sel())
|
||||
{
|
||||
client_moveresize(c, c->ogeo, True);
|
||||
c->tile = c->lmax = False;
|
||||
@ -160,7 +160,7 @@ tiled_client(int screen, Client *c)
|
||||
|| c->free
|
||||
|| c->screen != screen
|
||||
|| c->state_fullscreen
|
||||
|| ishide(c)); c = c->next);
|
||||
|| ishide(c, screen)); c = c->next);
|
||||
|
||||
return c;
|
||||
}
|
||||
@ -231,7 +231,7 @@ grid(int screen)
|
||||
? rows - 1
|
||||
: rows;
|
||||
|
||||
for(i = 0, c =tiled_client(screen, clients); c; c = tiled_client(screen, c->next), ++i)
|
||||
for(i = 0, c = tiled_client(screen, clients); c; c = tiled_client(screen, c->next), ++i)
|
||||
{
|
||||
/* Set client property */
|
||||
c->max = c->lmax = False;
|
||||
@ -688,7 +688,7 @@ uicb_togglefree(uicb_t cmd)
|
||||
void
|
||||
uicb_togglemax(uicb_t cmd)
|
||||
{
|
||||
if(!sel || ishide(sel) || sel->hint || sel->state_fullscreen)
|
||||
if(!sel || ishide(sel, selscreen) || sel->hint || sel->state_fullscreen)
|
||||
return;
|
||||
|
||||
if(!sel->max)
|
||||
|
||||
@ -86,7 +86,7 @@ mouse_move(Client *c)
|
||||
if(infobar[selscreen].tags[i]->win == sw)
|
||||
{
|
||||
c->screen = selscreen;
|
||||
tag_transfert(c, i);
|
||||
c->tag = i;
|
||||
arrange(selscreen);
|
||||
if(c->screen != oscreen)
|
||||
arrange(oscreen);
|
||||
|
||||
@ -139,7 +139,7 @@ Client* client_gb_button(Window w, int *n);
|
||||
void client_get_name(Client *c);
|
||||
void client_hide(Client *c);
|
||||
void client_kill(Client *c);
|
||||
Bool ishide(Client *c);
|
||||
Bool ishide(Client *c, int screen);
|
||||
void client_map(Client *c);
|
||||
void client_manage(Window w, XWindowAttributes *wa);
|
||||
void client_moveresize(Client *c, XRectangle geo, Bool r);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user