diff options
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index c659114..2f0dbce 100644 --- a/src/window.c +++ b/src/window.c @@ -6,6 +6,7 @@ GtkWidget *window; GtkWidget *scrolled_window; +int is_fullscreen = 0; static gboolean key_press(GtkWindow *window, GdkEvent *event, gpointer data) { @@ -103,3 +104,14 @@ void quit() g_application_quit( G_APPLICATION(gtk_window_get_application(GTK_WINDOW(window)))); } + +void toggle_fullscreen() +{ + if (is_fullscreen) { + gtk_window_unfullscreen(GTK_WINDOW(window)); + is_fullscreen = 0; + } else { + gtk_window_fullscreen(GTK_WINDOW(window)); + is_fullscreen = 1; + } +} |