mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
screen: Add "added" signal
This signal is emitted when a new screen is added. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
4731712af2
commit
2432dda3e3
1 changed files with 9 additions and 0 deletions
|
@ -145,8 +145,12 @@ screen_add(lua_State *L, int sidx)
|
|||
return;
|
||||
}
|
||||
|
||||
sidx = luaA_absindex(L, sidx);
|
||||
lua_pushvalue(L, sidx);
|
||||
luaA_object_ref(L, sidx);
|
||||
screen_array_append(&globalconf.screens, new_screen);
|
||||
luaA_object_emit_signal(L, -1, "added", 0);
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -755,6 +759,11 @@ screen_class_setup(lua_State *L)
|
|||
* @signal primary_changed
|
||||
*/
|
||||
signal_add(&screen_class.signals, "primary_changed");
|
||||
/**
|
||||
* This signal is emitted when a new screen is added to the current setup.
|
||||
* @signal added
|
||||
*/
|
||||
signal_add(&screen_class.signals, "added");
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
Loading…
Reference in a new issue