ewmh: Use client_set_sticky() for making clients sticky

We can't just directly assign c->sticky directly, because we should emit the
right signals and unban the client if it is currently ban. All of that gets
handled by client_set_sticky().

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2014-03-17 15:38:20 +01:00
parent b8271845e3
commit 0c7901394d
1 changed files with 5 additions and 1 deletions

6
ewmh.c
View File

@ -364,7 +364,11 @@ ewmh_process_desktop(client_t *c, uint32_t desktop)
{
int idx = desktop;
if(desktop == 0xffffffff)
c->sticky = true;
{
luaA_object_push(globalconf.L, c);
client_set_sticky(globalconf.L, -1, true);
lua_pop(globalconf.L, 1);
}
else if (idx >= 0 && idx < globalconf.tags.len)
for(int i = 0; i < globalconf.tags.len; i++)
if(idx == i)