X-Git-Url: https://git.danieliu.xyz/?p=surf.git;a=blobdiff_plain;f=surf.c;h=476fd563dd0d11780cd551567452cc873d639c3d;hp=0d9988f7ab8acc7032ff2d9f3424e40b67fdd2d5;hb=77fc27ef561c6777c2c05c394bf13183c1d74143;hpb=96edaa8412b4818d6fd34c395b52719ffc749469 diff --git a/surf.c b/surf.c index 0d9988f..476fd56 100644 --- a/surf.c +++ b/surf.c @@ -312,7 +312,7 @@ loadfile(Client *c, const gchar *f) { void loaduri(Client *c, const gchar *uri) { gchar *u; - u = g_strrstr(uri, ":") ? g_strdup(uri) + u = g_strrstr(uri, "://") ? g_strdup(uri) : g_strdup_printf("http://%s", uri); webkit_web_view_load_uri(c->view, u); c->progress = 0; @@ -416,6 +416,7 @@ processx(GdkXEvent *e, GdkEvent *event, gpointer d) { int idummy; unsigned long ldummy; unsigned char *buf = NULL; + if(((XEvent *)e)->type == PropertyNotify) { ev = &((XEvent *)e)->xproperty; if(ev->atom == urlprop && ev->state == PropertyNewValue) {