fixing _SURF_URL XProperty.
This commit is contained in:
parent
ccb449f42e
commit
b9b055348d
8
surf.c
8
surf.c
|
@ -272,8 +272,8 @@ loadcommit(WebKitWebView *view, WebKitWebFrame *f, gpointer d) {
|
||||||
Client *c = (Client *)d;
|
Client *c = (Client *)d;
|
||||||
gchar *uri;
|
gchar *uri;
|
||||||
|
|
||||||
uri = geturi(c);
|
|
||||||
ignore_once = TRUE;
|
ignore_once = TRUE;
|
||||||
|
uri = geturi(c);
|
||||||
XChangeProperty(dpy, GDK_WINDOW_XID(GTK_WIDGET(c->win)->window), urlprop,
|
XChangeProperty(dpy, GDK_WINDOW_XID(GTK_WIDGET(c->win)->window), urlprop,
|
||||||
XA_STRING, 8, PropModeReplace, (unsigned char *)uri,
|
XA_STRING, 8, PropModeReplace, (unsigned char *)uri,
|
||||||
strlen(uri) + 1);
|
strlen(uri) + 1);
|
||||||
|
@ -425,7 +425,10 @@ processx(GdkXEvent *e, GdkEvent *event, gpointer d) {
|
||||||
unsigned char *buf = NULL;
|
unsigned char *buf = NULL;
|
||||||
if(((XEvent *)e)->type == PropertyNotify) {
|
if(((XEvent *)e)->type == PropertyNotify) {
|
||||||
ev = &((XEvent *)e)->xproperty;
|
ev = &((XEvent *)e)->xproperty;
|
||||||
if(ignore_once == FALSE && ev->atom == urlprop && ev->state == PropertyNewValue) {
|
if(ev->atom == urlprop && ev->state == PropertyNewValue) {
|
||||||
|
if(ignore_once)
|
||||||
|
ignore_once = FALSE;
|
||||||
|
else {
|
||||||
XGetWindowProperty(dpy, ev->window, urlprop, 0L, BUFSIZ, False, XA_STRING,
|
XGetWindowProperty(dpy, ev->window, urlprop, 0L, BUFSIZ, False, XA_STRING,
|
||||||
&adummy, &idummy, &ldummy, &ldummy, &buf);
|
&adummy, &idummy, &ldummy, &ldummy, &buf);
|
||||||
loaduri(c, (gchar *)buf);
|
loaduri(c, (gchar *)buf);
|
||||||
|
@ -433,6 +436,7 @@ processx(GdkXEvent *e, GdkEvent *event, gpointer d) {
|
||||||
return GDK_FILTER_REMOVE;
|
return GDK_FILTER_REMOVE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return GDK_FILTER_CONTINUE;
|
return GDK_FILTER_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user