awesome: Add startup signal

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2015-02-14 15:41:11 +01:00
parent 74106462ac
commit 006b43cb6f
3 changed files with 10 additions and 0 deletions

View File

@ -539,6 +539,7 @@ main(int argc, char **argv)
/* scan existing windows */ /* scan existing windows */
scan(tree_c); scan(tree_c);
luaA_emit_startup();
xcb_flush(globalconf.connection); xcb_flush(globalconf.connection);
/* Setup the main context */ /* Setup the main context */

8
luaa.c
View File

@ -474,6 +474,7 @@ luaA_init(xdgHandle* xdg)
signal_add(&global_signals, "systray::update"); signal_add(&global_signals, "systray::update");
signal_add(&global_signals, "wallpaper_changed"); signal_add(&global_signals, "wallpaper_changed");
signal_add(&global_signals, "refresh"); signal_add(&global_signals, "refresh");
signal_add(&global_signals, "startup");
signal_add(&global_signals, "exit"); signal_add(&global_signals, "exit");
} }
@ -587,6 +588,13 @@ luaA_class_newindex_miss_property(lua_State *L, lua_object_t *obj)
return 0; return 0;
} }
void
luaA_emit_startup()
{
lua_State *L = globalconf_get_lua_State();
signal_object_emit(L, &global_signals, "startup", 0);
}
void void
luaA_emit_refresh() luaA_emit_refresh()
{ {

1
luaa.h
View File

@ -206,6 +206,7 @@ int luaA_class_index_miss_property(lua_State *, lua_object_t *);
int luaA_class_newindex_miss_property(lua_State *, lua_object_t *); int luaA_class_newindex_miss_property(lua_State *, lua_object_t *);
int luaA_default_index(lua_State *); int luaA_default_index(lua_State *);
int luaA_default_newindex(lua_State *); int luaA_default_newindex(lua_State *);
void luaA_emit_startup(void);
void luaA_systray_invalidate(void); void luaA_systray_invalidate(void);