client: Ignore "fake" string property changes
I noticed high CPU usage while using asunder. The reason was that asunder re-sets its window name every 0.1 seconds (and awesome's drawing code is way too slow). A semi-fix for this is to ignore string property changes if the old and new value for the property are equal. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
14722aa6e4
commit
a0e45e878e
|
@ -113,6 +113,11 @@ DO_CLIENT_SET_PROPERTY(skip_taskbar)
|
|||
client_set_##prop(lua_State *L, int cidx, char *value) \
|
||||
{ \
|
||||
client_t *c = luaA_checkudata(L, cidx, &client_class); \
|
||||
if (A_STREQ(c->prop, value)) \
|
||||
{ \
|
||||
p_delete(&value); \
|
||||
return; \
|
||||
} \
|
||||
p_delete(&c->prop); \
|
||||
c->prop = value; \
|
||||
luaA_object_emit_signal(L, cidx, "property::" #signal, 0); \
|
||||
|
|
Loading…
Reference in New Issue