Introduction
Introduction Statistics Contact Development Disclaimer Help
tfixing _SURF_URL XProperty. - surf - customized build of surf, the suckless we…
git clone git://src.adamsgaard.dk/surf
Log
Files
Refs
README
LICENSE
---
commit b9b055348d4b8ae9372702afc59793cdcba16144
parent ccb449f42e1b52c2152b8b91563dc4ffdcd173a9
Author: Enno Boland (Gottox) <[email protected]>
Date: Mon, 8 Jun 2009 22:55:48 +0200
fixing _SURF_URL XProperty.
Diffstat:
M surf.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/surf.c b/surf.c
t@@ -272,8 +272,8 @@ loadcommit(WebKitWebView *view, WebKitWebFrame *f, gpointe…
Client *c = (Client *)d;
gchar *uri;
- uri = geturi(c);
ignore_once = TRUE;
+ uri = geturi(c);
XChangeProperty(dpy, GDK_WINDOW_XID(GTK_WIDGET(c->win)->window), urlpr…
XA_STRING, 8, PropModeReplace, (unsigned char *)uri,
strlen(uri) + 1);
t@@ -425,12 +425,16 @@ processx(GdkXEvent *e, GdkEvent *event, gpointer d) {
unsigned char *buf = NULL;
if(((XEvent *)e)->type == PropertyNotify) {
ev = &((XEvent *)e)->xproperty;
- if(ignore_once == FALSE && ev->atom == urlprop && ev->state ==…
- XGetWindowProperty(dpy, ev->window, urlprop, 0L, BUFSI…
- &adummy, &idummy, &ldummy, &ldummy, &buf);
- loaduri(c, (gchar *)buf);
- XFree(buf);
- return GDK_FILTER_REMOVE;
+ if(ev->atom == urlprop && ev->state == PropertyNewValue) {
+ if(ignore_once)
+ ignore_once = FALSE;
+ else {
+ XGetWindowProperty(dpy, ev->window, urlprop, 0…
+ &adummy, &idummy, &ldummy, &ldummy, &b…
+ loaduri(c, (gchar *)buf);
+ XFree(buf);
+ return GDK_FILTER_REMOVE;
+ }
}
}
return GDK_FILTER_CONTINUE;
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.