Keep cookie policies for new windows
[surf.git] / surf.c
diff --git a/surf.c b/surf.c
index 906d145..ba01958 100644 (file)
--- a/surf.c
+++ b/surf.c
@@ -910,11 +910,13 @@ newclient(void) {
 static void
 newwindow(Client *c, const Arg *arg, gboolean noembed) {
        guint i = 0;
-       const char *cmd[14], *uri;
+       const char *cmd[16], *uri;
        const Arg a = { .v = (void *)cmd };
        char tmp[64];
 
        cmd[i++] = argv0;
+       cmd[i++] = "-a";
+       cmd[i++] = cookiepolicies;
        if(!enablescrollbars)
                cmd[i++] = "-b";
        if(embed && !noembed) {
@@ -1391,6 +1393,9 @@ main(int argc, char *argv[]) {
 
        /* command line args */
        ARGBEGIN {
+       case 'a':
+               cookiepolicies = EARGF(usage());
+               break;
        case 'b':
                enablescrollbars = 0;
                break;