~strahinja/surf

777e69fcf8cdd8f868223e5985587fd7ac935033 — Страхиња Радић 11 months ago ff63f32 master
Make cleaner exit function: quitprogram

Signed-off-by: Страхиња Радић <contact@strahinja.org>
2 files changed, 8 insertions(+), 1 deletions(-)

M config.h
M surf.c
M config.h => config.h +1 -1
@@ 159,7 159,7 @@ static Key keys[] = {
	{ MODKEY,                GDK_KEY_slash,  spawn,      SETPROP("_SURF_FIND", "_SURF_FIND", PROMPT_FIND) },
	{ MODKEY,                GDK_KEY_m,      spawn,      BM_ADD("_SURF_URI") },

        { MODKEY,                GDK_KEY_q,      destroywin, { 0 } }, 
        { MODKEY,                GDK_KEY_q,	 quitprogram, { 0 } }, 

	{ 0,                     GDK_KEY_Escape, stop,       { 0 } },


M surf.c => surf.c +7 -0
@@ 241,6 241,7 @@ static void scrollv(Client *c, const Arg *a);
static void scrollh(Client *c, const Arg *a);
static void navigate(Client *c, const Arg *a);
static void stop(Client *c, const Arg *a);
static void quitprogram(Client *c, const Arg *a);
static void toggle(Client *c, const Arg *a);
static void togglefullscreen(Client *c, const Arg *a);
static void togglecookiepolicy(Client *c, const Arg *a);


@@ 2003,6 2004,12 @@ stop(Client *c, const Arg *a)
}

void
quitprogram(Client *c, const Arg *a)
{
	closeview(c->view, c);
}

void
toggle(Client *c, const Arg *a)
{
	curconfig[a->i].val.i ^= 1;