luaa: Add "refresh" signal

This signal is emitted whenever awesome finishes the current event loop run.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-10-15 18:48:07 +02:00
parent 8712be7265
commit ab3674ec13
2 changed files with 11 additions and 0 deletions

View File

@ -24,9 +24,13 @@
#include "objects/client.h"
/* luaa.c */
void luaA_emit_refresh(void);
static inline int
awesome_refresh(void)
{
luaA_emit_refresh();
banning_refresh();
stack_refresh();
client_focus_refresh();

7
luaa.c
View File

@ -628,6 +628,7 @@ luaA_init(xdgHandle* xdg)
signal_add(&global_signals, "debug::index::miss");
signal_add(&global_signals, "debug::newindex::miss");
signal_add(&global_signals, "systray::update");
signal_add(&global_signals, "refresh");
signal_add(&global_signals, "exit");
}
@ -719,4 +720,10 @@ luaA_class_newindex_miss_property(lua_State *L, lua_object_t *obj)
return 0;
}
void
luaA_emit_refresh()
{
signal_object_emit(globalconf.L, &global_signals, "refresh", 0);
}
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80