summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-05-13 13:54:19 -0400
committerKristian Høgsberg <krh@bitplanet.net>2011-05-16 10:43:32 -0400
commit393d47aa6f41e9472210f69e8170f1f36ca6141e (patch)
treee29305376948b1848ba69cedd42c1aedcf7655e3
parent12283cc9a205a25214e1e77bb0ef5114c0b31951 (diff)
view: Add fullscreen option
-rw-r--r--clients/view.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/clients/view.c b/clients/view.c
index 406226a6..2732d016 100644
--- a/clients/view.c
+++ b/clients/view.c
@@ -208,7 +208,8 @@ keyboard_focus_handler(struct window *window,
}
static struct view *
-view_create(struct display *display, uint32_t key, const char *filename)
+view_create(struct display *display,
+ uint32_t key, const char *filename, int fullscreen)
{
struct view *view;
gchar *basename;
@@ -249,12 +250,20 @@ view_create(struct display *display, uint32_t key, const char *filename)
keyboard_focus_handler);
window_set_button_handler(view->window, button_handler);
view->page = 0;
+
+ view->fullscreen = fullscreen;
+ window_set_fullscreen(view->window, view->fullscreen);
+
view_draw(view);
return view;
}
+static int option_fullscreen;
+
static const GOptionEntry option_entries[] = {
+ { "fullscreen", 'f', 0, G_OPTION_ARG_NONE,
+ &option_fullscreen, "Run in fullscreen mode" },
{ NULL }
};
@@ -271,7 +280,7 @@ main(int argc, char *argv[])
}
for (i = 1; i < argc; i++)
- view_create (d, i, argv[i]);
+ view_create (d, i, argv[i], option_fullscreen);
display_run(d);