mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
unset hidden state when a client regains focus
This should be the expected behavior, imo. Otherwise the client doesn't appear in tasklist regardless of being focussed. [Thanks Uli][1] :). [1]: http://thread.gmane.org/gmane.comp.window-managers.awesome.devel/7096 Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
fa1ca80705
commit
c654cfd8d2
1 changed files with 23 additions and 10 deletions
|
@ -669,6 +669,26 @@ client_set_minimized(lua_State *L, int cidx, bool s)
|
|||
}
|
||||
}
|
||||
|
||||
/** Set a client hidden, or not.
|
||||
* \param L The Lua VM state.
|
||||
* \param cidx The client index.
|
||||
* \param s Set or not the client hidden.
|
||||
*/
|
||||
void
|
||||
client_set_hidden(lua_State *L, int cidx, bool s)
|
||||
{
|
||||
client_t *c = luaA_checkudata(L, cidx, &client_class);
|
||||
|
||||
if(c->hidden != s)
|
||||
{
|
||||
c->hidden = s;
|
||||
banning_need_update();
|
||||
if(strut_has_value(&c->strut))
|
||||
screen_emit_signal(globalconf.L, c->screen, "property::workarea", 0);
|
||||
luaA_object_emit_signal(L, cidx, "property::hidden", 0);
|
||||
}
|
||||
}
|
||||
|
||||
/** Set a client sticky, or not.
|
||||
* \param L The Lua VM state.
|
||||
* \param cidx The client index.
|
||||
|
@ -850,9 +870,10 @@ client_unban(client_t *c)
|
|||
|
||||
c->isbanned = false;
|
||||
|
||||
/* An unbanned clients shouldn't be minimized */
|
||||
/* An unbanned client shouldn't be minimized or hidden */
|
||||
luaA_object_push(globalconf.L, c);
|
||||
client_set_minimized(globalconf.L, -1, false);
|
||||
client_set_hidden(globalconf.L, -1, false);
|
||||
lua_pop(globalconf.L, 1);
|
||||
}
|
||||
}
|
||||
|
@ -1233,15 +1254,7 @@ luaA_client_set_screen(lua_State *L, client_t *c)
|
|||
static int
|
||||
luaA_client_set_hidden(lua_State *L, client_t *c)
|
||||
{
|
||||
bool b = luaA_checkboolean(L, -1);
|
||||
if(b != c->hidden)
|
||||
{
|
||||
c->hidden = b;
|
||||
banning_need_update();
|
||||
if(strut_has_value(&c->strut))
|
||||
screen_emit_signal(globalconf.L, c->screen, "property::workarea", 0);
|
||||
luaA_object_emit_signal(L, -3, "property::hidden", 0);
|
||||
}
|
||||
client_set_hidden(L, -3, luaA_checkboolean(L, -1));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue