summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2015-11-20 01:00:38 +0100
committerQuentin Rameau <quinq@fifth.space>2015-11-20 01:00:38 +0100
commitacec16e6854a46f8ead8edec87a8a1c0c1c18425 (patch)
treeef4b3920b256b30e8ba69f4308474a6fd1ded5e0
parent42fdc77f5e4929fd618ab63e600ed550d52a0326 (diff)
downloadsurf-acec16e6854a46f8ead8edec87a8a1c0c1c18425.tar.gz
surf-acec16e6854a46f8ead8edec87a8a1c0c1c18425.tar.bz2
surf-acec16e6854a46f8ead8edec87a8a1c0c1c18425.zip
Adapt navigate()
-rw-r--r--surf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/surf.c b/surf.c
index 8a98e74..e04f531 100644
--- a/surf.c
+++ b/surf.c
@@ -152,7 +152,7 @@ static void mousetargetchanged(WebKitWebView *v, WebKitHitTestResult *h,
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);
@@ -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 *