-
-
Save Elv13/5805895 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in | |
index ff94e0e..d5f589e 100644 | |
--- a/lib/awful/util.lua.in | |
+++ b/lib/awful/util.lua.in | |
@@ -73,7 +73,8 @@ end | |
-- @param cmd The command. | |
-- @param sn Enable startup-notification. | |
-- @param screen The screen where to spawn window. | |
--- @return The awesome.spawn return value. | |
+-- @return The forked PID. | |
+-- @return The startup notification UID. | |
function util.spawn(cmd, sn, screen) | |
if cmd and cmd ~= "" then | |
if sn == nil then sn = true end | |
diff --git a/spawn.c b/spawn.c | |
index 749b436..ea5ddc7 100644 | |
--- a/spawn.c | |
+++ b/spawn.c | |
@@ -367,8 +367,10 @@ luaA_spawn(lua_State *L) | |
/* push pid on stack */ | |
lua_pushnumber(L, pid); | |
+ /* push sn on stack */ | |
+ if (context) | |
+ lua_pushstring(L,sn_launcher_context_get_startup_id(context)); | |
- return 1; | |
+ return (context)?1:2; | |
} | |
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment