Introduction
Introduction Statistics Contact Development Disclaimer Help
tAdapt navigate() - surf - customized build of surf, the suckless webkit browser
git clone git://src.adamsgaard.dk/surf
Log
Files
Refs
README
LICENSE
---
commit acec16e6854a46f8ead8edec87a8a1c0c1c18425
parent 42fdc77f5e4929fd618ab63e600ed550d52a0326
Author: Quentin Rameau <[email protected]>
Date: Fri, 20 Nov 2015 01:00:38 +0100
Adapt navigate()
Diffstat:
M surf.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/surf.c b/surf.c
t@@ -152,7 +152,7 @@ static void mousetargetchanged(WebKitWebView *v, WebKitHit…
guint modifiers, Client *c);
static void loadchanged(WebKitWebView *v, WebKitLoadEvent e, Client *c);
static void loaduri(Client *c, const Arg *arg);
-static void navigate(Client *c, const Arg *arg);
+static void navigate(Client *c, const Arg *a);
static Client *newclient(Client *c);
static WebKitWebView *newview(Client *c, WebKitWebView *rv);
static void showview(WebKitWebView *v, Client *c);
t@@ -836,10 +836,12 @@ loaduri(Client *c, const Arg *arg)
}
void
-navigate(Client *c, const Arg *arg)
+navigate(Client *c, const Arg *a)
{
- int steps = *(int *)arg;
- webkit_web_view_go_back_or_forward(c->view, steps);
+ if (a->i < 0)
+ webkit_web_view_go_back(c->view);
+ else if (a->i > 0)
+ webkit_web_view_go_forward(c->view);
}
Client *
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.