Fix inspector toggling
Always get the inspector object, and let the user eventually close it even if it's disabled for the current page.
This commit is contained in:
parent
c8fdd4d583
commit
1206b2c587
5
surf.c
5
surf.c
|
@ -1084,7 +1084,6 @@ showview(WebKitWebView *v, Client *c)
|
||||||
GdkWindow *gwin;
|
GdkWindow *gwin;
|
||||||
|
|
||||||
c->finder = webkit_web_view_get_find_controller(c->view);
|
c->finder = webkit_web_view_get_find_controller(c->view);
|
||||||
if (curconfig[Inspector].val.b)
|
|
||||||
c->inspector = webkit_web_view_get_inspector(c->view);
|
c->inspector = webkit_web_view_get_inspector(c->view);
|
||||||
|
|
||||||
c->win = createwindow(c);
|
c->win = createwindow(c);
|
||||||
|
@ -1535,13 +1534,11 @@ togglecookiepolicy(Client *c, const Arg *a)
|
||||||
void
|
void
|
||||||
toggleinspector(Client *c, const Arg *a)
|
toggleinspector(Client *c, const Arg *a)
|
||||||
{
|
{
|
||||||
if (curconfig[Inspector].val.b) {
|
|
||||||
if (webkit_web_inspector_is_attached(c->inspector))
|
if (webkit_web_inspector_is_attached(c->inspector))
|
||||||
webkit_web_inspector_close(c->inspector);
|
webkit_web_inspector_close(c->inspector);
|
||||||
else
|
else if (curconfig[Inspector].val.b)
|
||||||
webkit_web_inspector_show(c->inspector);
|
webkit_web_inspector_show(c->inspector);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
find(Client *c, const Arg *a)
|
find(Client *c, const Arg *a)
|
||||||
|
|
Loading…
Reference in New Issue