From 5389c0ccce709b101505725ac258b2fa74c52fee Mon Sep 17 00:00:00 2001 From: miguel Date: Mon, 19 Mar 2018 19:26:54 +0100 Subject: added quit (to close singulary windows) --- config.h | 2 ++ surf.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/config.h b/config.h index 264727a..fd09086 100644 --- a/config.h +++ b/config.h @@ -183,6 +183,8 @@ static Key keys[] = { { 0, GDK_KEY_y, clipboard, { .i = 0 } }, + { 0, GDK_KEY_q, quit, { 0 } }, + { MODKEY|GDK_SHIFT_MASK, GDK_KEY_p, print, { 0 } }, { MODKEY, GDK_KEY_t, showcert, { 0 } }, diff --git a/surf.c b/surf.c index e1420b0..860cfaa 100644 --- a/surf.c +++ b/surf.c @@ -229,6 +229,7 @@ static void togglecookiepolicy(Client *c, const Arg *a); static void toggleinspector(Client *c, const Arg *a); static void find(Client *c, const Arg *a); static void sendext(Client *c, const Arg *a); +static void quit(Client *c, const Arg *a); /* Buttons */ static void clicknavigate(Client *c, const Arg *a, WebKitHitTestResult *h); @@ -1047,6 +1048,11 @@ destroyclient(Client *c) free(c); } +void quit(Client *c, const Arg *a) +{ + gtk_widget_destroy(c->win); +} + void cleanup(void) { -- cgit v1.2.3