screen: untag, even if it's sticky
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
71f24097c0
commit
202b7b3c1a
25
screen.c
25
screen.c
|
@ -253,10 +253,7 @@ screen_virttophys(int screen)
|
||||||
void
|
void
|
||||||
screen_client_moveto(client_t *c, screen_t *new_screen, bool dotag, bool doresize)
|
screen_client_moveto(client_t *c, screen_t *new_screen, bool dotag, bool doresize)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
screen_t *old_screen = c->screen;
|
screen_t *old_screen = c->screen;
|
||||||
tag_array_t *old_tags = &old_screen->tags,
|
|
||||||
*new_tags = &new_screen->tags;
|
|
||||||
area_t from, to;
|
area_t from, to;
|
||||||
|
|
||||||
if(new_screen == c->screen)
|
if(new_screen == c->screen)
|
||||||
|
@ -267,19 +264,21 @@ screen_client_moveto(client_t *c, screen_t *new_screen, bool dotag, bool doresiz
|
||||||
if(c->titlebar)
|
if(c->titlebar)
|
||||||
c->titlebar->screen = new_screen;
|
c->titlebar->screen = new_screen;
|
||||||
|
|
||||||
if(dotag && !c->issticky)
|
if(dotag)
|
||||||
{
|
{
|
||||||
/* remove old tags */
|
/* remove old tags */
|
||||||
for(i = 0; i < old_tags->len; i++)
|
foreach(old_tag, old_screen->tags)
|
||||||
untag_client(c, old_tags->tab[i]);
|
untag_client(c, *old_tag);
|
||||||
|
|
||||||
/* add new tags */
|
/* \todo move this to Lua */
|
||||||
foreach(new_tag, *new_tags)
|
if(!c->issticky)
|
||||||
if((*new_tag)->selected)
|
/* add new tags */
|
||||||
{
|
foreach(new_tag, new_screen->tags)
|
||||||
tag_push(globalconf.L, *new_tag);
|
if((*new_tag)->selected)
|
||||||
tag_client(c);
|
{
|
||||||
}
|
tag_push(globalconf.L, *new_tag);
|
||||||
|
tag_client(c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!doresize)
|
if(!doresize)
|
||||||
|
|
Loading…
Reference in New Issue