WebKitWebView *view;
WebKitWebInspector *inspector;
char *title, *linkhover;
- const char *uri, *needle;
+ const char *needle;
gint progress;
struct Client *next;
gboolean zoomed, fullscreen, isinspecting, sslfailed;
g_object_get(result, "context", &context, NULL);
if(context & WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK) {
- if(e->button == 2) {
+ if(e->button == 2 ||
+ (e->button == 1 && CLEANMASK(e->state) == CLEANMASK(MODKEY))) {
g_object_get(result, "link-uri", &arg.v, NULL);
newwindow(NULL, &arg, e->state & GDK_CONTROL_MASK);
return true;
}
/* prevents endless loop */
- if(c->uri && strcmp(u, c->uri) == 0) {
+ if(strcmp(u, geturi(c)) == 0) {
reload(c, &a);
} else {
webkit_web_view_load_uri(c->view, u);
g_object_set(G_OBJECT(settings), "default-font-size",
defaultfontsize, NULL);
- /* While stupid, CSS specifies that a pixel represents 1/96 of an inch.
+ /*
+ * While stupid, CSS specifies that a pixel represents 1/96 of an inch.
* This ensures websites are not unusably small with a high DPI screen.
- * It is equivalent to firefox's "layout.css.devPixelsPerPx" setting. */
+ * It is equivalent to firefox's "layout.css.devPixelsPerPx" setting.
+ */
if(zoomto96dpi) {
screen = gdk_window_get_screen(GTK_WIDGET(c->win)->window);
dpi = gdk_screen_get_resolution(screen);
c->isinspecting = false;
}
+ if(runinfullscreen) {
+ c->fullscreen = 0;
+ fullscreen(c, NULL);
+ }
+
g_free(uri);
setatom(c, AtomFind, "");
static void
usage(void) {
- die("usage: %s [-biknpsvx] [-c cookiefile] [-e xid] [-r scriptfile]"
+ die("usage: %s [-bBfFgGiIkKnNpPsSvx]"
+ " [-c cookiefile] [-e xid] [-r scriptfile]"
" [-t stylefile] [-u useragent] [uri]\n", basename(argv0));
}
case 'e':
embed = strtol(EARGF(usage()), NULL, 0);
break;
+ case 'f':
+ runinfullscreen = 1;
+ break;
+ case 'F':
+ runinfullscreen = 0;
+ break;
case 'g':
allowgeolocation = 0;
break;