summaryrefslogtreecommitdiffstats
path: root/surf.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--surf.c44
1 files changed, 5 insertions, 39 deletions
diff --git a/surf.c b/surf.c
index dcd0ad0..100a1f0 100644
--- a/surf.c
+++ b/surf.c
@@ -79,8 +79,7 @@ static GdkNativeWindow embed = 0;
static gboolean showxid = FALSE;
static char winid[64];
static gboolean loadimage = 1, plugin = 1, script = 1, using_proxy = 0;
-static char togglestat[6];
-static gboolean insertmode = FALSE;
+static char togglestat[5];
static char *buildpath(const char *path);
static gboolean buttonrelease(WebKitWebView *web, GdkEventButton *e, GList *gl);
@@ -103,7 +102,6 @@ static void find(Client *c, const Arg *arg);
static const char *getatom(Client *c, int a);
static char *geturi(Client *c);
static gboolean initdownload(WebKitWebView *v, WebKitDownload *o, Client *c);
-static void insert(Client *c, const Arg *arg);
static gboolean keypress(GtkWidget *w, GdkEventKey *ev, Client *c);
static void linkhover(WebKitWebView *v, const char* t, const char* l, Client *c);
static void loadstatuschange(WebKitWebView *view, GParamSpec *pspec, Client *c);
@@ -437,47 +435,18 @@ initdownload(WebKitWebView *view, WebKitDownload *o, Client *c) {
return FALSE;
}
-void
-insert(Client *c, const Arg *arg) {
- insertmode = TRUE;
- update(clients);
-}
-
gboolean
keypress(GtkWidget* w, GdkEventKey *ev, Client *c) {
- guint i, state;
+ guint i;
gboolean processed = FALSE;
- /* turn off insert mode */
- if(insertmode && (ev->keyval == GDK_Escape)) {
- insertmode = FALSE;
- update(c);
- return TRUE;
- }
-
- if(insertmode && (((ev->state & MODKEY) != MODKEY) || !MODKEY)) {
- return FALSE;
- }
-
- if(ev->keyval == GDK_Escape) {
- webkit_web_view_set_highlight_text_matches(c->view, FALSE);
- return TRUE;
- }
-
updatewinid(c);
for(i = 0; i < LENGTH(keys); i++) {
- if(!insertmode && (MODKEY & keys[i].mod)) {
- state = ev->state | MODKEY;
- } else {
- state = ev->state;
- }
-
if(gdk_keyval_to_lower(ev->keyval) == keys[i].keyval
+ && (ev->state & keys[i].mod) == keys[i].mod
&& keys[i].func) {
- if(state == keys[i].mod) {
- keys[i].func(c, &(keys[i].arg));
- processed = TRUE;
- }
+ keys[i].func(c, &(keys[i].arg));
+ processed = TRUE;
}
}
@@ -953,9 +922,6 @@ gettogglestat(Client *c){
g_object_get(G_OBJECT(settings), "enable-caret-browsing",
&value, NULL);
togglestat[3] = value?'C':'c';
-
- togglestat[4] = insertmode? '+' : '-';
- togglestat[5] = '\0';
}
140b89219de68458c715f35999&follow=1'>Torified surf is unstableGravatar GhostAV 1-2/+6 2015-07-13Fix type of strictssl property.Gravatar Quentin Rameau 1-1/+1 2015-02-10Removing the debug print from the last commit.Gravatar Christoph Lohmann 1-1/+0 2015-02-10allow buttonrelease customization in config.hGravatar Markus Teich 2-8/+48 2015-02-03surf: see hover URL without changing titleGravatar Greg Reagle 1-0/+10 2015-02-03Some cleanup in style.Gravatar Christoph Lohmann 1-2/+2 2015-01-26Describe the web page indicators too.Gravatar Christoph Lohmann 1-0/+1 2015-01-26It wasn't really clear what was meant with site indicators in the manpage.Gravatar Christoph Lohmann 1-0/+1 2015-01-26surf: documented indicators in man pageGravatar Greg Reagle 1-0/+50 2015-01-20fix stylesheet interna.Gravatar Markus Teich 1-19/+12 2015-01-20Only plumb some URI, when it's ASCII.Gravatar Christoph Lohmann 1-1/+10 2015-01-20Oh my blob!Gravatar Christoph Lohmann 1-0/+1 2015-01-19Data: is part of the browser too.Gravatar Christoph Lohmann 1-0/+1 2015-01-19file:// should be handled in surf too.Gravatar Christoph Lohmann 1-0/+1 2015-01-19Remove the debugging from the testing.Gravatar Christoph Lohmann 1-1/+0 2015-01-19Add some description for the plumb feature.Gravatar Christoph Lohmann 1-0/+3 2015-01-19Add plumbing functionality.Gravatar Christoph Lohmann 2-2/+28 2015-01-18Add a comment about how the styles are iterated.Gravatar Christoph Lohmann 1-0/+4 2015-01-18My CMD was too short. :OGravatar Christoph Lohmann 1-1/+1 2015-01-17Add the manpage changes for the disk cache support.Gravatar Christoph Lohmann 1-1/+7 2015-01-17Adding disk cache support for soup.Gravatar Christoph Lohmann 2-9/+40 2015-01-17Fix extra newline, and add -g where other switches are forwarded.Gravatar Ben Woolley 1-1/+3 2015-01-17Newer libc want _DEFAULT_SOURCE.Gravatar Christoph Lohmann 1-1/+1 2015-01-17Major styles update.Gravatar Christoph Lohmann 3-11/+84 2015-01-02Fix a typo in surf manual.Gravatar Jakukyo Friel 1-1/+1 2014-09-28Minor style change.Gravatar Christoph Lohmann 1-1/+1 2014-09-28Make »Copy image address« work.Gravatar Christoph Lohmann 1-3/+10 2014-08-07Mention xdotool in SEE ALSO too.Gravatar Christoph Lohmann 1-1/+2 2014-08-07Fix the manpage about xid.Gravatar Christoph Lohmann 1-1/+3